Closed colinwong closed 12 months ago
The example code provided under 'Create your own component to keep it DRY' isn't working. I had to add the following:
componentWillReceiveProps(nextProps) { this.setState({ value: nextProps.value, valid: nextProps.valid, }); } render() { return ( <FormInput value={this.state.value} valid={this.state.valid} {...this.restOfProps} /> ); }
Prop changes was not rippling to the underlying component. Am I doing something wrong? Thanks.
The example code provided under 'Create your own component to keep it DRY' isn't working. I had to add the following:
Prop changes was not rippling to the underlying component. Am I doing something wrong? Thanks.