![]() ![]() Use it only when you need to share state between lot's of components with a lot of nesting. I mentioned how people overuse Redux, and it also applies to Context API. ![]() You'll also be able to notice I used the new " Hooks" feature that is shipped with React since version 16.8 to make it even neater and easier to create contexts. getElementById ( "root" ) ) export default withUser ( LoginForm ) The difference between the two options above is if you want the context to be a single nested property by this name, to explode it to its properties (which in my opinion is more convenient).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |