Context API - Behaviors
- When you have multiple contexts, what component type should you use (class/function) and why?
Functions, because of it’s simpler syntax and as such better results.
- What are some good use cases for using the Context API for global state?
If you have some data that you want to pass from your main js file to a far away child in the chain, or data that many files need to use.
- How can you best test context?
By using the app as any user would use it, and not by testing it directly.