Put in order · JavaScript and React course · Module 4: Context API and useReducer
Re-rendering Process on Context Change
Arrange what happens when the value in a Provider changes:
Items to put in order
- React compares the new value with the old one (Object.is)
- Updated data is displayed in the UI
- State in Provider changes (e.g., via setState)
- All components consuming this context re-render
- Provider passes a new value through the value prop
You can check the correct answer by solving this task in the CodeWorlds game.