-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fixes the warning message thrown by react 0.14 #612
Conversation
Please read #603 |
"This error message will only be displayed in this version from react. With version 0.15.x it will no longer be displayed." |
From what I understand it's actually going to break in 0.15, from the react blog
|
That is implemented by my PR #572 as you can see: DOMNode = this.getDOMNode() ? (this.refs[options.ref] || this).getDOMNode() : this.refs[options.ref] || this; |
Yes, I understand, it's the PR I've referenced in my initial comment, but I'm not sure what the problem is, you can still keep this workaround for 0.13. I'm simply suggesting to have a separate release that is not backward compatible and avoids throwing warnings. |
@RubaXa this will not get rid of the error message, because the DOMNode = this.getDOMNode() ? (this.refs[options.ref] || this).getDOMNode() : this.refs[options.ref] || this; is the only reliable method i could think of to
|
i created a fiddle for it, if you would like to play around with it! https://jsfiddle.net/q0gLex1b/ PS: Sortable React Mixin is inline in the HTML |
@ChiefORZ @RubaXa I don't think it's unreasonable to just bump the (minor) version of master and make it forward compatible only. This is the advantage of using semantic versioning. Anyone on the older version can still depend on it without changing their code. This still allows you to release hotfixes in the 1.4.x branch. The reason they changed the warnings to console.error in the latest release is mentioned in the release notes:
So, I think there is a misunderstanding with what ChiefORZ is suggesting, they will not disappear in the next version but will instead stop working. |
@mgibeau no, it will not. |
@ChiefORZ You are wrong if they will remove 0.15 getDOMNode, the mixin will be broken, but my version will work, because I check availability before calling of this function. |
@RubaXa yes, indeed. Thank you! getDOMNode will be undefined and the mixin will stop working... |
reading your discussion, but wondering: should we also try to make a Sortable component rather than a mixin? probably simpler and not having to put ref in options and it the jsx, I started in react so I'll give it a try also for |
Hmm does the code suggested actually work with react 0.15. As the code stands now the issue #448 will pup up again when upgrading react |
@alexander-svendsen Unfortunateley issue #448 was never fixed... And yes, i am positive that this code is going to work with version 0.15. |
Does this need more discussion or can we merge this once the merge conflicts are resolved? |
Conflicts: package.json react-sortable-mixin.js
Working with Sortable on React 15 and I get this error message. Going back to 0.14.x fixes the problem, so I'm pretty confident that this needs a new workaround! I'm still new to React so I'm not sure how to help yet. |
@BrendanBerkley Unfortunately, nothing ever came out of this, so your best bet at the moment is to fork the library and apply the fix manually. I don't think this library is being maintained anymore. |
#754 provided the code I needed to get this working. |
Dear all! Meteor is moved to the separate repository. If this issue is still actual, please create it there once again and this rojects needs a maintainer: |
This fixes the warnings in React 0.14 introduced by #572, but is not backward compatible with 0.13, which is why I've added the peerDependency declaration. My suggestion would be to create a separate release for this, eg.: 1.5.x.