You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the problems that I have is that there is nothing tying these bindings to a particular version of React and so the project could be using a version of React that doesn't use the new life cycle methods. So I'm a bit worried about making the bindings rely on a particular version of React.. but that ties my hands a bit in terms of supporting new features!
A good example is that these bindings don't support returning an array of elements from Render methods, which were introduced in React 16, or the Fragment approach that did similar (that was added in 16.2.0, I think).
In terms of the new life cycle methods, if I understand it correctly then they are deprecating these:
componentWillMount
componentWillReceiveProps
componentWillUpdate
And adding these:
getDerivedStateFromProps
getSnapshotBeforeUpdate
.. so the changes are not enormous.. but I don't want Bridge.React to fall behind, either.
I will have a think about this. The easiest thing will be to add [Obsolete] tags to the deprecated life cycle methods so that their use gets flagged as a warning in Visual Studio. And I would like to try to have the package include some sort of warning if features are being used for a future version of React - for example, if you create a component that uses "getSnapshotBeforeUpdate" and your application has loaded a version of React that doesn't support it then you would get a descriptive warning in the browser console. Something similar could be done for Fragments.
So the short answer is that there are no solid plans yet. But I hope that it will happen relatively soon!
Hello! Are there plans to move to New React-lifecycle?
The text was updated successfully, but these errors were encountered: