bun
bun copied to clipboard
can't use redux with next's
Just tried to implement redux-toolkit from https://redux-toolkit.js.org/tutorials/quick-start.
Error loading app: /Users/eren/Desktop/Projects/JavaScript/bun-next-app/pages/_app
843 | error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
844 | }
845 | }
846 | }
847 |
848 | var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
^
TypeError: undefined is not an object (evaluating 'ReactSharedInternals.ReactCurrentDispatcher')
at /Users/eren/Desktop/Projects/JavaScript/bun-next-app/node_modules/react-dom/cjs/react-dom.development.js:848:29
at /Users/eren/Desktop/Projects/JavaScript/bun-next-app/node_modules/react-dom/cjs/react-dom.development.js:26260:18
at http://localhost:3000/blob:node_modules.server.bun:1:16430
at /Users/eren/Desktop/Projects/JavaScript/bun-next-app/node_modules/react-dom/index.js:37:27
at http://localhost:3000/blob:node_modules.server.bun:1:16430
at /Users/eren/Desktop/Projects/JavaScript/bun-next-app/node_modules/react-redux/es/utils/reactBatchedUpdates.js:1:0
package.json
{
"name": "bun-next-app",
"version": "0.0.52",
"main": "index.js",
"dependencies": {
"@reduxjs/toolkit": "^1.8.3",
"next": "12.1.3",
"react": "^17",
"react-dom": "^17",
"react-is": "^17.0.2",
"react-redux": "^8.0.2"
},
"devDependencies": {
"@types/react": "latest",
"bun-framework-next": "^12",
"typescript": "latest",
"react-refresh": "0.10.0"
}
}
Same here redux not working well in react app when I provide store in index.js
Redux appear to be working fine with bun. I added the counter from the example here to a repo made with bun create react:
https://github.com/birkskyum/redux-reproduction-bun
Seems like Next support is the problem here.