score:2

Accepted answer
_renderChildren(selectedOption) {
    if (!selectedOption) {
      return null;
    }
    if (selectedOption === "A") {
      return <TextField key="A" value="optionA" />;
    }
    if (selectedOption === "B") {
      return <TextField key="B" value="optionB" />;
    }
  }

score:1

componentDidUpdate() {
   if (this.state.value !== this.props.value) {
     this.setState({ value: this.props.value });
   }
}

Related Query

More Query from same tag