State Management · Junior · Question 29 of 75
How do you connect a Redux store to a React app?
- ✓Correct answer: Wrap the app in
<Provider store={store}>fromreact-redux - 2Import the store into every component that needs it
- 3Pass the store to
createRoot(el, { store })
Explanation
Provider makes the store available to useSelector and useDispatch anywhere below. Under the hood it uses Context only to pass the store reference; subscriptions are handled separately and precisely.