reflux / refluxjs

A simple library for uni-directional dataflow application architecture with React extensions inspired by Flux
BSD 3-Clause "New" or "Revised" License
5.36k stars 330 forks source link

Include React 16 in peer dependencies. #543

Open AndrewSouthpaw opened 6 years ago

AndrewSouthpaw commented 6 years ago

Based on #537, and from my own testing, the latest Reflux works fine with React 16. This PR updates the peer dependency to include React 16.

AndrewSouthpaw commented 6 years ago

I don't understand why this build is failing, it builds fine locally. My only guess is that this build uses npm 2.14.4 and I use npm 5.6.0.

Thoughts?

jrm2k6 commented 6 years ago

Any update on this? Would be great to have this merged! Let me know if I can help in any way

aewing commented 6 years ago

It looks like the build is failing because the React version is specified as 15 in the .travis.yml, but react-dom is installing 16.2.0

aewing commented 6 years ago

Given the current state of the tests, the easiest solution here is to modify the .travis.yml to install react-dom at the version specified in ENV. The better solution would probably be to involve react-dom/test-utils in the Component test and to update the .travis.yml to instead install React 16. As it stands now the tests fail under React 16 as they are using the deprecated React.createClass method.

AndrewSouthpaw commented 6 years ago

Interesting. If they're using React.createClass I wonder why it doesn't blow up for React 16...

eek commented 6 years ago

Also the npm WARN peerDependencies

The peer dependency react included from reflux will no longer
be automatically installed to fulfill the peerDependency in npm 3+.

Your application will need to depend on it explicitly.

React needs to be moved from peerDependecies to dependencies

aewing commented 6 years ago

@AndrewSouthpaw I believe createClass is only used for the component tests.

aewing commented 6 years ago

FWIW, I had modified the travis build to install react-dom at the specified version in #545 and received a log4js error during build, so I think that is also likely to be an impediment to a merge.

AndrewSouthpaw commented 6 years ago

Ah, that makes sense.

ied3vil commented 5 years ago

You can go ahead and use https://github.com/ied3vil/reflux-react-16

Also, if you feel you want to improve, you can PR

carolineapp commented 4 years ago

Is there any update on this? I too would like to update the React version but not sure if it will break anything.

ied3vil commented 4 years ago

Just use the repo i posted above your comment, we have been using it in production with React 16.x without issues for a year