-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Prepare for upcoming react deprecations introduced in 16.3 #2732
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
@justinobney this is great, could you start a PR for this? |
Is this up for grabs? I'm happy to do it. |
@joshuaobrien that would be great. I doubt I could get to it for a few weeks. |
I'm on it. Will get started on the weekend :) |
I would like to start on this, Couple of life cycle methods are marked as UNSAFE in 16.3 and two new methods getDerivedStateFromProps, getSnapshotBeforeUpdate got introduced. @levithomason what exactly do we need to do? |
Hi @msrikanth508, I am working on this at the moment. What we need to do is refactor the components that use the deprecated methods so that they no longer use them. Functionality that was in these deprecated lifecycle methods needs to be moved into other lifecycle methods. My experiences so far is that these changes are not always clean cut. Also, changes to tests are likely required to accommodate the new methods. |
Is this still needed I would be happy to hop on it this upcoming weekend and take a gander? |
Yep, feel free to pickup 👍 |
I would love to work on this if it's still needed? |
It's still needed. I haven't got around to it. There is a PR here: #2757 |
Hey is this still open to work on @justinobney @joshuaobrien |
- Remove unsafe lifecycles: - `componentWillMount` - `componentWillRecieveProps` - `componentWillUpdate` Relates to Semantic-Org#2732
In case nobody has addressed this, I created a PR #3244 . |
Remove unsafe lifecycles from `AutoControlledComponent` and affected components: - `componentWillMount` - `componentWillRecieveProps` - `componentWillUpdate` Relates to Semantic-Org#2732
Remove unsafe lifecycles from `AutoControlledComponent` and affected components: - `componentWillMount` - `componentWillRecieveProps` - `componentWillUpdate` Relates to Semantic-Org#2732
@danpantry It's unfixable as there are no alternative, so we are not going to fix. Once the feature from reactjs/rfcs#97 will be released, we will update to it. |
Executed via `npx react-codemod rename-unsafe-lifecycles --parser babel` Disabled lint issues for updated lines. Closes Semantic-Org#3741 Related to Semantic-Org#2732
@layershifter: Hello, from the future :) It appears that reactjs/rfcs#97 has been closed and while there are two proposed approaches, it seems unlikely that either will land before Suspense ships. |
What does this mean for now ? I'm a day into development for a small ui application at work now with semantic-ui and I am hitting this deprecation warning. If this won't be fixed I can't put code in production with warnings in the console popping up. Will it get fixed eventually ? |
@Celludriel The deprecation warnings are nothing to worry about unless you intend to upgrade to a version of React which removes the unsupported lifecycle methods. It doesn't appear that React will be removing them for a long time, but you should be aware that certain components that you're using within Semantic, for the time being, will not support concurrent mode and so may have subtle bugs. If you're not using concurrent mode, it's probably not an issue. As for whether or not it will get fixed, I imagine it will, but there problems that prevent the fix from happening right now. |
@danpantry Thanks for the information, I disabled strict mode for now so the warning doesn't pop up since our security department is pretty strict when it comes to warnings in the console. Even if it's non sensical they should worry about it. I'll await the future if it will get fixed later on. Just glad I don't have to switch ui libraries since this one is working just fine for me now |
Addressing I am fixing |
Hi guys. Do you need any help with this? |
I believe the rest of these deprecated methods are being resolved in #3956, after which I believe this issue can be closed. |
Any more updates on this? This feature is highly anticipated, semantic ui react in its current version throws so many warnings related to this. |
Fixes for lifecycles were released in |
Suggestion: begin migration to new react lifecycles while retaining backwards compatibility via
react-lifecycles-compat
Example: https://www.youtube.com/watch?v=G9S1IghlkCI
Steps
react-semantic-ui
components.Expected Result
Actual Result
Version
0.79.1
Testcase
The text was updated successfully, but these errors were encountered: