-
Notifications
You must be signed in to change notification settings - Fork 126
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
React v16.3 #165
Comments
Here's some quick comments: Context: I think your example is wrong, because you're using getDerivedStateFromProps:
I think not. A new PS: I haven't seriously used nor played with React 16.3 new features yet |
I think you should also consider showing warnings for the deprecated lifecycle methods:
|
@maximgatilin this is React’s job, it’ll warm anyway since Rum is using those methods |
@roman01la Got it |
You are right, fixed.
Agreed, it would be better for compatibility to add new lifecycle hooks 👍 |
Regarding forwardRef API, I've looked briefly at the code of React.js itself, it only sets a custom property on the internal React component object itself. My understanding of rum is that the only APIs that manipulate it are the Just sharing some thoughts, I did not try at all to implement it. |
Not in Clojure JVM side. |
Is there any intention to merge this pull request or update React to later versions at all? In my project, I have a couple of other libraries that depend on later versions of React and having two versions of React in the same project is a bad idea. I'm willing to spend time and update it (and prepare pull-request), but want to make sure that I'm not missing some reason on why rum needs to depend on the older version of React? Thank you for the awesome library! |
@Bearz you can use React 16.3 just fine, just override the version in the dependencies |
Dear owner and contributors |
Rum is not actively maintained. Maybe choose another, more modern framework? |
There is no equivalent replacement for Rum :-( |
Dear owner Thanks |
I agree that would be nice. Unfortunately my attempts did not succeeded so far |
Tracking issue for React 16.3 API changes: https://reactjs.org/blog/2018/03/29/react-v-16-3.html
Let's discuss these changes before starting with implementation, cc @tonsky @piranha @DjebbZ @jetmind (mention more people)
Official Context APINot sure if we need a wrapper at all, but here's an example.
Wrappers
Usage
createRef API #204Wrapper
Usage
or instance bound ref via userland mixin
forwardRef API
Not sure if it will work with Rum. Needs investigation.
Component Lifecycle Changes
New lifecycle methods
getDerivedStateFromProps
Rum's
:did-remount
lifecycle mixin runs incomponentWillReceiveProps
, perhaps Rum could usegetDerivedStateFromProps
here (in non-breaking way).getSnapshotBeforeUpdate
Rum's
:did-update
and:after-render
lifecycle mixins run incomponentDidUpdate
, perhaps Rum could usegetSnapshotBeforeUpdate
here (in non-breaking way).StrictMode ComponentI think we don't need a wrapper here, same as for
React.Fragment
The text was updated successfully, but these errors were encountered: