Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

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

Open
ahmedglas opened this issue Apr 15, 2024 · 1 comment

Comments

@ahmedglas
Copy link

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

  • React version: 18.2.0
  • Redux version: 5.0.1
  • React-Redux version: 9.1.1
  • React-scripts version: 5.0.1

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

  • Checked and confirmed the correct import of connect from react-redux.
  • Reinstalled all node modules and cleared cache.
  • Checked for any typos or incorrect usage patterns with Redux-related functions and components.

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

@fidojahfal
Copy link

fidojahfal commented May 10, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants