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

Remove react from peer dependencies #4

Merged
merged 1 commit into from
Jul 14, 2015
Merged

Conversation

ide
Copy link
Contributor

@ide ide commented Jul 14, 2015

Installing react-redux with React Native ends up installing web React because npm automatically installs peer dependencies (until npm 3.0 is here). Likewise it'd be noisy if react-native were listed under the peer dependencies when most people don't need it. One day this won't be an issue anymore React splits into three pieces -- react, react-dom, react-native w/react as an external dependency.

(I understand if you don't want to take this PR especially when React 0.14 is out and parent v owner context becomes an issue...)

Installing react-redux with React Native ends up installing web React because npm automatically installs peer dependencies (until npm 3.0 is here). Likewise it'd be noisy if react-native were listed under the peer dependencies when most people don't need it. One day this won't be an issue anymore React splits into three pieces -- react, react-dom, react-native w/react as an external dependency.
gaearon added a commit that referenced this pull request Jul 14, 2015
Remove react from peer dependencies
@gaearon gaearon merged commit 899ec49 into reduxjs:master Jul 14, 2015
@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

OK, that's sensible.
I'll add peerDep after 0.14 is released (because we'll depend on parent context & package split).

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

Out in 0.2.2

@Tankpt
Copy link

Tankpt commented Apr 21, 2016

Hi, @gaearon In npm3 peerDependencies will not install in node_modules.
And this will not transform react in react-redux by browserify-shim.

@gaearon
Copy link
Contributor

gaearon commented Apr 21, 2016

Not sure what you are referring to. Peer dependency has since been added. It won't install React—this is up to you to depend on it, as your app should depend on React anyway. And I don't see how this is related to Browserify.

@Tankpt
Copy link

Tankpt commented Apr 21, 2016

Thanks for your reply.

I try to package my code and external React etcs. And every thing was ok except the react-redux.

browserify-shim Issues is thlorenz/browserify-shim#209.

@gaearon
Copy link
Contributor

gaearon commented Apr 21, 2016

Thanks, this clarifies it. Likely an issue on their side.
Why do you use externals for React and Redux though? They are compatible with CommonJS just fine. And you can use UMD builds if you really need them as separate files.

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

3 participants