Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to import reducer from redux-form' #4287

Closed
lucasribeiiroo opened this issue Dec 5, 2018 · 5 comments
Closed

Error trying to import reducer from redux-form' #4287

lucasribeiiroo opened this issue Dec 5, 2018 · 5 comments

Comments

@lucasribeiiroo
Copy link

ERROR MESSAGE -> withRef is removed. To access the wrapped instance, use a ref on the connected component
the app was running ok, importing the reducer from redux-form and added to combine reducers, this error appears and i can't find the solution in the web.

import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { createStore, applyMiddleware, compose } from 'redux'

import App from './components/App'
import reducers from './reducers'

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const store = createStore(
  reducers,
  composeEnhancers(applyMiddleware(thunk))
)

ReactDOM.render(
  <Provider store={store}>
  <App />
  </Provider>,
  document.querySelector('#root')
)


import { combineReducers } from 'redux'
import authReducer from './authReducer'
import {reducer} from '../../node_modules/redux-form/lib/reducer'

export default combineReducers({
  auth: authReducer,
  form: reducer,
})

@JeffreyATW
Copy link
Contributor

This happened because you used React-Redux 6, which Redux Form does not support. Downgrade to 5 and it should work.

https://github.com/reduxjs/react-redux/releases/tag/v6.0.0

That said, I'd love to see Redux Form support React-Redux 6.

@wesleysd1989
Copy link

React Redux requires React 16.4 or later.

how your version on of react?
i pass my react 16.6.3 to "react": "16.4.2", and work fine here.

@jerrygreen
Copy link

Experienced too, but looks like update fixed the problem.

Found here that is fixed in 8.0.0

However, this may be in several different places in your projects (different libs) - so be careful. redux-form looks fine. I suggest to close the issue

@gustavohenke
Copy link
Collaborator

Thanks for the heads up, @jerrygreen! 😃

@lock
Copy link

lock bot commented Apr 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
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

5 participants