codestates / codestates/Cogether
[❓에러 핸들링 ] 한은태 / 2021-10-26
Open
Error
Front-End
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## **어떤 에러가 발생했나요?**
Error: could not find react-redux context value; please ensure the component is wrapped in a
## **에러 핸들링 방법**
const AppWrapper = () => {
const store = createStore(rootReducer);
return (
// Set context
// Now App has access to context
)
}
const App = () => {
const dispatch = useDispatch(); // Works!
...
index.js 에서 을 provider 로 감싸줘야한다.
## **에러 설명 및 해결 과정 설명**
https://stackoverflow.com/questions/60329421/usedispatch-error-could-not-find-react-redux-context-value-please-ensure-the
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.