I was trying to use react-redux for my react native app but somehow this problem came up
error: bundling failed: Error: Unable to resolve module `./hooks/useDispatch` from `C:\Users\TF\lesson\node_modules\react-redux\lib\index.js`: The module `./hooks/useDispatch` could not be found from `C:\Users\TF\lesson\node_modules\react-redux\lib\index.js`. Indeed, none of these files exist:;
I have tried reinstalling and rerunning the react-redux@6 but i cant seem to understand why it needs a hook\useDispatch.
How may i go about to get my installation done properly?
This solution solved my problem, open terminal and run
react-native start --reset-cache
and leave it open and run thisreact-native run-android
in another terminal
If you use expo, then run the following command to reset the expo cache:
expo r -c
This is where I found the information: https://github.com/reduxjs/react-redux/issues/1247
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With