-
Notifications
You must be signed in to change notification settings - Fork 105
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
component does not work with React 16 #21
Comments
I think it should works fine, see the react document:
|
Please give a reproducible demo, and the detail error info. |
You can reproduce the crash using
You will see in console:
|
See facebook/react#10309 for the clarification why this is a breaking changes in React 16 that will remain. The point is that to use the return value of ReactDOM.render should be avoided in general. |
How about an online demo?
Edit: @paranoidjk , it seems that rc-notification hasn't provided dist file? See: https://unpkg.com/rc-notification@2.0.2/ |
ping~ @paranoidjk |
@benjycui react-component/react-component.github.io#14 It's caused by rc-tools break change. |
@abramobagnara Please provide a reproducible demo, eg: https://codepen.io/paranoidjk/pen/NvxmKQ?editors=0011 @benjycui I found our umd dist do not handle
|
This is a reproducible demo: |
Any news on this one? |
I have the same error |
I confirm that it doesn't work with React 16 |
After upgrade to React@16... If we use But if we don't use I think we must fix this issue, for developers may use |
Looks like we need rewrite this with new portal api. But i am pretty busy on another project these days. @silentcloud @benjycui @yesmeck @zhang740 Anybody want to handle this? |
Actually, we don't need to.. Even if we rewrite with |
See: #27 We cannot use |
The cause is the use of ReactDOM.render return value, that is an obsolete feature (also in React 15).
We should use ref instead.
https://facebook.github.io/react/docs/react-dom.html#render
The text was updated successfully, but these errors were encountered: