davidkpiano / react-redux-form

Create forms easily in React with Redux.
https://davidkpiano.github.io/react-redux-form
MIT License
2.06k stars 252 forks source link

Library broken when update to react-redux >= 6.0.0. #1197

Open Huespal opened 5 years ago

Huespal commented 5 years ago

The Problem

I've updated to react-redux 6.0.0 (https://github.com/reduxjs/react-redux/releases) and react-redux-form library stoped working.

Steps to Reproduce

Update to react-redux >= 6.0.0 and compile your code. A Form with a Control with an Error component, all from react-redux-form library.

Expected Behavior

react-redux-form library working.

Actual Behavior

react-redux-form library not working. Dev tools shows this error: Error: Could not find "store" in either the context or props of "Connect(Errors)". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(Errors)"

I think is because this react-redux breaking change: Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both and . You may also pass {context : MyContext} as an option to connect.

Thanks :D

P.D: I'm sure maintenance mode covers this ;)