[React Part 2] Advanced Topics and Hooks
Now you can truly start to 'see' React. Learn advanced concepts and Hooks in the easiest and most accurate way.
783 learners
Level Intermediate
Course period Unlimited

[Appendix] MyReact Context Improvements
Hello. Thank you for taking React Part 2. While answering questions, I found some helpful information for the class.
Question content
[Chapter 2.1 Context] I have a question about 2.1.4 Suppliers and Consumers / .
[Chapter 3.5 Context Hook] I have a question about 3.5.2 useContenxt.
We've received a lot of thought and questions while creating the React context. We've prepared an appendix with the improvements we've made to MyReact's context.
Code changes and text: https://github.com/jeonghwan-kim/lecture-react-season2/pull/1
summation
When consuming values with a context created with MyReact.createContext() , the component is rendered twice.
I wrote some test code to demonstrate the problem.
Removed unnecessary renders of components that subscribe to contexts.
If you have already completed the course, it will be helpful to review this content. If you are taking the course before, I recommend listening to it first and then watching this video.
thank you




