Click in order · JavaScript and React course · Module 4: Context API and useReducer
Provider Setup
Arrange the code for a space Provider:
Items to click
- <SpaceContext.Provider value={{ state, dispatch }}>{children}</SpaceContext.Provider>
- return (
- const [state, dispatch] = useReducer(spaceReducer, initialState);
- function SpaceProvider({ children }) {
- ); }
You can check the correct answer by solving this task in the CodeWorlds game.