title: How to change props to state in React Hooks?
body: <p>In Simple react class component we used to change the props to state this way: </p>
  
  <pre><code>constructor(props) {
      super(props)
  
      this.state = {
        pitch: props.booking.pitch,
        email: props.booking.email,
        firstName: props.booking.firstName,
        arrivalDate: props.booking.arrivalDate
      }
  } 
  </code></pre>
  
  <p>But I am not aware of how to do it in new feature as Hooks, but I am trying to do it this way.</p>
  
  <pre><code>const GenerateDescHook = ({ description: initialDesc }) =&gt; {
    const [description, setDescription] = useState(null)
  
  useEffect(() =&gt; {
      setDescription(initialDesc)
    }, {})
  
   function handleChangeVariance(newVariance) {
      setDescription({
        ...description,
        template: {
          ...description.template,
          variance_name: newVariance,
        },
      })
    }
  
  }
  </code></pre>
  
  <p>Basically, I just need to change description props, which coming from another parent component to turn to state. Pls, could you show me how to do it in new way as Hooks way?</p>