When using the state wrapper, you can now set the 'initial' state:
@wrapStateHelpers
export default class Example extends Component {
componentDidMount() {
this.props.setWrappingState({
userName: ''
});
},
componentDidReceiveProps(nextProps) {
this.props.setWrappingState({
// if you are manually passing render props in and want that to override
// the internally managed state at nextProps.values.userName
userName: nextProps.userName
});
}
});