Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pure React FE #161

Closed
quanla opened this issue Dec 25, 2017 · 10 comments
Closed

Pure React FE #161

quanla opened this issue Dec 25, 2017 · 10 comments

Comments

@quanla
Copy link

quanla commented Dec 25, 2017

This is my implementation of RealWorld frontend using only React as the framework, no Redux or MobX used.

Repo: https://github.com/quanla/pure-react-sample-realworld
Demo: https://quanla.github.io/pure-react-sample-realworld-pages/

Code lines: 1752, Bundle size: 98k
Thanks

@quanla quanla changed the title I have Pure React implementation. Please help check I have finished a pure React implementation. Please help check Dec 25, 2017
@EricSimons EricSimons changed the title I have finished a pure React implementation. Please help check Pure React FE Dec 27, 2017
@EricSimons
Copy link
Member

@quanla awesome work! I'm gonna proof this & hit up some other people to as well :D

@quanla
Copy link
Author

quanla commented Dec 27, 2017

Thanks Eric

@quanla
Copy link
Author

quanla commented Dec 28, 2017

Hi @EricSimons , have you looked at my work? I just did a small fix to remove a unnecessary dependency and the bundle size is now 65k

@quanla
Copy link
Author

quanla commented Jan 6, 2018

Hi @EricSimons, do you have any update on this?

1 similar comment
@quanla
Copy link
Author

quanla commented Jan 12, 2018

Hi @EricSimons, do you have any update on this?

This was referenced Jan 14, 2018
@Cameron-C-Chapman
Copy link
Member

@quanla the functionality of this looks good to me, nice work!

Are there any component tests? If possible we like there to be at least one test wired up so someone trying to learn the framework at least sees how that typically looks. Would it be possible to add a simple test and update the readme to show a user how to run them?

@quanla
Copy link
Author

quanla commented Jan 26, 2018

Hi @Cameron-C-Chapman,

Too bad I am not a big fan of test cases.

Also, one of the good things about Pure React is that I am not introducing any thing new to the game here. The React components I use is no different than the React components used in Redux-React framework or MobX-React framework, and I am pretty sure that my usage of React component is way simpler than Redux framework. If they dont have test cases for their React component, then I dont think I should need to.

In fact, after tens of applications big and small that I have written using Pure React, no test case for JSX code is written, and they all run very well. Simplicity is the key to success, not test cases.

There are also commonjs/nodejs files in the project which may contain more complicated code than the JSX files, and I do write test cases for them, but I wouldn't call them framework specific test cases. If you agree to accept such a test case, then I can write one or a few.

How do you think?

Thanks

@Cameron-C-Chapman
Copy link
Member

The idea of adding a unit test isn't about if unit tests are valuable or not, it's more about introducing someone who is looking to learn from your project with a way to run unit tests.

I could argue for the value of unit tests all day long but this probably isn't the forum for that. If you are adamant against unit testing and would like to get this submitted without them as long as it gets the stamp of approval from @EricSimons and/or others on the React codebase then it should be good to go.

@quanla
Copy link
Author

quanla commented Feb 3, 2018

Hi @Cameron-C-Chapman, do you think this way of testing (provided by FB) is a possible way to go around the test case requirement?

https://facebook.github.io/jest/docs/en/tutorial-react.html

If yes then I can provide 1 such case, if no then I dont think I can do any better than that, and let just close this issue and we can forget about this framework of mine :)

@Cameron-C-Chapman
Copy link
Member

That's perfect 😄 (jest is what I use for my JavaScript unit testing). If you don't mind adding a test case and updating the readme with how to run it you'd have my stamp of approval for this.

Thanks @quanla!

@quanla quanla closed this as completed Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants