mironov / react-redux-loading-bar

Loading Bar (aka Progress Bar) for Redux and React
https://mironov.github.io/react-redux-loading-bar/
MIT License
936 stars 93 forks source link

TypeError: connect is not a function after upgrading to react-redux 9.1.1 #136

Open ahmedglas opened 4 months ago

ahmedglas commented 4 months ago

Description

After upgrading to react-redux version 9.1.1, our project began experiencing an error with the connect function, which is now resulting in a TypeError: connect is not a function. This issue occurs when attempting to use connect to link Redux state to a React component. The exact error message is:

Uncaught TypeError: (0 , _reactRedux.connect) is not a function at ./node_modules/react-redux-loading-bar/build/loading_bar.js (loading_bar.js:302:1) at options.factory (react refresh:6:1) at webpack_require (bootstrap:24:1) at fn (hot module replacement:62:1) .....

Environment

Steps to Reproduce

  1. Upgrade react-redux to version 9.1.1.
  2. Start the application using npm start or yarn start.
  3. Error occurs when the application tries to use the connect function from react-redux.

Troubleshooting Steps Tried

Please let me know if there are any workarounds or if additional information is required to diagnose this issue further. Thank you! image

fidojahfal commented 3 months ago

Hi @ahmedglas , for now i resolve the issue with downgrading the version of react-redux to ^8.1.3, hope can help to fix your issues too... image