If the props on the component are changed without the component being refreshed,
the new prop value will never be displayed because the constructor function will never update the current state of the component.
The initialization of state from props only runs when the component is first created.
class MyComponent extends React.Component {
constructor(props) {
super(props)
this.state = {
record: []
}
}render() {
return <div>{this.props.inputValue}</div>
}
}