Put in order · JavaScript and React course · Module 4: Context API and useReducer
Provider Composition
Arrange the stages of building a separated context system from outside to inside:
Items to put in order
- Define separate contexts (createContext)
- Consume contexts via custom hooks in components
- Compose providers into a single wrapper component
- Create a Provider for each context
You can check the correct answer by solving this task in the CodeWorlds game.