React 17.0 is going to be awesome...
Nipuna Weerasekara

Nipuna Weerasekara @niweera

About: Part time web developer, full time dreamer.

Location:
Sri Lanka
Joined:
May 28, 2019

React 17.0 is going to be awesome...

Publish Date: Sep 2 '19
6 2

Everyone know that in React 17 most of the depracated since 16.3 update and now they want us to rename the old lifecycles as UNSAFE_ and only they will work in 17.x React update. Now as a developer and more comfortable with these deprecated lifecycle methods, I am struggling to migrate the existing componentWillMount, componentWillReceiveProps, componentWillUpdate code to static getDerivedStateFromProps and componentDidUpdate. It would be awesome, if someone from this DEV community to provide us some guidelines to how to migrate with some examples. For an instance, if someone can provide us an example of how to migrate user profile edit which is coded using componentWillReceiveProps to newer lifecycle methods, that would be a great help.
Thanks in advance...

Comments 2 total

  • Michel Wilhelm
    Michel WilhelmSep 2, 2019

    I'm interested on this topic too. I don't know how to migrate. Today I'm using componentDidMount to do async requests to populate specific components

    • Nipuna Weerasekara
      Nipuna WeerasekaraSep 2, 2019

      I'm still using the old methods. If I get to know any source I'll let you know.

Add comment