-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Comments
@quanla awesome work! I'm gonna proof this & hit up some other people to as well :D |
Thanks Eric |
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 |
Hi @EricSimons, do you have any update on this? |
1 similar comment
Hi @EricSimons, do you have any update on this? |
@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? |
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 |
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. |
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 :) |
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! |
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
The text was updated successfully, but these errors were encountered: