-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update for React 0.14.x #371
Comments
Could this be done with a one-time check? Something like var React = require('react');
var findDOMNode = React.findDOMNode;
if (React.version.split('.')[1] >= '14') {
findDOMNode = require('react-dom').findDOMNode;
} I've not tried this (not sure if findDOMNode needs to be bound or not, for example), but if this is the only issue, it might be worth trying it, then we can stick with one npm version that supports 0.13 & 0.14. Are there any other components supporting both 0.13 and 0.14? |
That seems reasonable to me. I might check the major version number too, just to be future proof. |
🎉 v1.0 support 🎉 ! Seriously though, I suspect supporting more than two versions of react is currently extremely difficult - between two versions everything should still work, just possibly with deprecation warnings, between 3 versions, all bets are off! Be good to know if this kinda logic works in practice though. |
@mxdubois I'd prefer not to branch until we're ready to commit, long-lived branches tend to create more problems than they're worth, and any project overhead cuts into effort that could be spent on better things. Unfortunately,
This is correct, and we'll probably want to keep react-select compatible with Not sure if we'll be able to do anything about those warnings in the meantime, as much as I'd really like to 😕 |
@mik01aj that's often the error you get when you've got two instances of React loaded in your page. Maybe check for that? Something might be depending on 0.13 and causing problems. |
@JedWatson you are right! 😮 I have no idea how you guessed it... |
Only seeing that like a million times in various issues. The first few, it took a lot more effort to work out 😛 |
And now I know why. The other React version comes from |
Ah |
I loved that tweet. I've added a condition to package.json that allows for it (beta releases aren't covered by the usual syntax with semver) and am about to release a new version, just merging PRs that are ready to go & writing up a changelog now. If you're impatient, you can pull from master and it should work. |
It still installs |
Yup. I just published a new version of that too - |
Works now! Thanks! (btw, I didn't notice that the |
No worries. I needed it for I've just released a new version of |
FYI, based on my understanding, This is described here: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#dom-node-refs I guess one approach is that For
Not having a dependency on |
There is also the ability to bundle with Webpack if Browserify is causing issues. I'd be willing to help if you need the resources. The |
Just realised I didn't close this when 0.7 was released with React 0.14 support. Doing that now :) |
Hey,
I know it's a bit early, as React 0.14.x is still in beta, but sometime soon it'd be good to get a branch going with 0.14.x support.
I'm seeing these warnings:
Everything else seems to be fine, though.
The text was updated successfully, but these errors were encountered: