What will happen if you use props in initial state?

Parent component passes a prop down to the Child component. The Child component will first be constructed via the constructor method. Then we assign the prop to the state.
But what if the parent component updates its prop? Since the constructor only gets called once, the child component’s state won’t get the updated prop.

The below component won’t display the updated input value:

In order to get the updated props value, we must use props inside render method.
Now, anytime the parent component updates the prop, this child component will get the update.