-
Notifications
You must be signed in to change notification settings - Fork 721
updating componentWillMount W2-lesson-Plan.md #238
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
Comments
We should remove the comment about I don't understand what this has to do with using |
yes for sure in order to initialize a
Documentations Update according to the second point I think we should use the constructor instead of the Thanks for noticing me about the SSR Part, I try to will take care of that 🙏 |
You should never be initialising state in You should either use a |
Oh Nice to know, every day is a school day 💐, because I was doing it 🙃, in the project even. How ever it has been deprecated now, but what about |
One more thing, is it a good Idea to use the Because I think it's a better use of leaving there out, while it's there for this propose. so in this way we will have all the static parts to work on in collaborate maybe, and the docs we may just make it there for an easy edit follow and detect by maintainers. |
Can you paste an example of what exactly you were doing inside Generally speaking, it's bad practice because it's going to result in an unnecessary render cycle, whereas using a I've never used GitHub wikis, but it seems like a good place for tutorials and tips. |
I should be clear though - the state initialisation thing is mostly a concern because it shows incomplete understanding of what React is actually doing, and how you should develop a component-based application. One extra render cycle is basically a non-issue in all practical cases. |
an example of the project |
I will correct the spelling and try to maintain the language grammars there because I didn't study English as people doing usually, and then I will update the wikis here, I will make a note to @gijscor to make it for maintainers only access. |
Thanks for that example. In those kind of cases, where you are checking cookies and doing other things, it would make sense to use the |
Good luck with the wiki, as always just let me know if you need any help. |
I appreciate your help, thanks a lot 😃 |
This Update is based on HackYourFuture#238
componentWillMount
is no longer in use since 16.3v, as one of the students mentioned and by following that in the React official docs too.what we may apply in the lesson-plan instead is: facebook/react#7671 (comment)
or we may get back to the
constructor
method with using thesuper
key word instead?The text was updated successfully, but these errors were encountered: