title: A thought about getDerivedStateFromProps
body: <p>According to this post about <a href="https://medium.com/@baphemot/whats-new-in-react-16-3-d2c9b7b6193b" rel="nofollow noreferrer">what's news in React 16.3</a>, in the next update <code>componentWillReceiveProps</code> will have a replacement and that is <code>getDerivedStateFromProps</code> (the replacement will only happens in 17.0).</p>
  
  <p>The interesting part is that this brand new, static lifecycle method </p>
  
  <blockquote>
    <p>is called both on initial mounting and on re-rendering of the
    component, so you can use it instead of creating state based on props
    in constructor.</p>
  </blockquote>
  
  <p>I'm getting confused. So from now on should I need to split my constructor and put the create state logic to this new function instead? I mean the logic when you create state first time your component is created and the logic when you create state from API props is not the same. Putting them together in one method seems not very ideal.</p>
  
  <p>And one more thing is that if I choose to create my state from constructor, this new method will still be called anyway. What a jerk!</p>
  
  <p>What do you think?</p>