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

[RFR] Upgrade react-redux to version 7.1 #3349

Merged
merged 1 commit into from
Jun 20, 2019
Merged

[RFR] Upgrade react-redux to version 7.1 #3349

merged 1 commit into from
Jun 20, 2019

Conversation

fzaninotto
Copy link
Member

Requires changes in useSelector due to breaking change in react-redux 7.1.0-alpha.5 (see https://github.com/reduxjs/react-redux/releases/tag/v7.1.0-alpha.5).

Without this upgrade, TypeScript will fail to build after a yarn fresh install, because the new DefinitelyTyped types for react-redux enforce the useSelector signature of 7.1.0 final.

Requires changes in useSelector due to breaking change in react-redux 7.1.0-alpha.5 (see https://github.com/reduxjs/react-redux/releases/tag/v7.1.0-alpha.5).
@fzaninotto fzaninotto added this to the 3.0.0 milestone Jun 20, 2019
@@ -19,7 +19,7 @@
"react-admin": "^2.0.0",
"react-app-polyfill": "^0.1.3",
"react-dom": "~16.8.0",
"react-redux": "^7.1.0-rc.1",
"react-redux": "^7.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove this line as ra-core already includes it as a dependency (not a peer)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because some components in ra-ui-material-ui use useDispatch and useSelector directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And ? ra-ui-material also depends on ra-core

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but we have to be explicit about our dependencies. If ra-ui-material-ui imports functions from recat-router, it must have react-router in dependencies. I didn't invent that rule, it's enforced by TypeScript I think.

Also, this PR doesn't change anything regarding new dependencies - it just upgrades them.

@djhi djhi merged commit 4923f84 into next Jun 20, 2019
@djhi djhi deleted the react-redux-7.1 branch June 20, 2019 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants