Skip to content

Consider inlining all types from Redux core #1894

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

Closed
markerikson opened this issue Apr 12, 2022 · 2 comments
Closed

Consider inlining all types from Redux core #1894

markerikson opened this issue Apr 12, 2022 · 2 comments

Comments

@markerikson
Copy link
Contributor

Right now we import several specific types from the redux core package. I actually was about to say "we have a hard dependency on the redux core", but I actually don't even see it listed as a dep, which makes me very suspicious about the v8 branch in its current form.

Anyway, we currently import these types: Action, AnyAction, Dispatch, Store, and ActionCreatorsMapObject.

We inlined our implementation of bindActionCeators a while back, but the types requirement means we still have a tie to the actual redux package.

Given our current discussion around discouraging use of redux by itself, as well as the various shenanigans with NPM, peerDeps, and redux vs @reduxjs/toolkit, I think we ought to look at inlining those types directly into the v8 codebase so that react-redux has 0 need to import anything from redux. This also goes along with the idea that any store-compatible object is legal to pass to <Provider>.

@markerikson
Copy link
Contributor Author

After discussion with @Methuselah96 , we've decided to just add an optional peerDep on redux instead.

@markerikson
Copy link
Contributor Author

Resolved by #1895

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

No branches or pull requests

1 participant