I'm trying to develop multistep registration, referring this link : https://www.viget.com/articles/building-a-multi-step-registration-form-with-react
But I could not use refs and don't know how to fix this.
This is the error msg I get everytime I click on 'next' button error msg
and this is my code
<input type="text"
className='singleComponent'
name='AppName'
ref='AppName'
defaultValue={ this.props.fieldValues.AppName }
/>
<button>Cancel</button>
<button onClick={this.SaveAndContinue}>Next</button>
SaveAndContinue(e){
e.preventDefault();
var data={
AppName : this.refs.AppName,
}
this.props.saveValues(data)
this.props.nextStep()
}
}
Dependencies :
"react": "^16.1.0",
"react-dev-utils": "^4.2.1",
"react-dom": "^16.1.0",
can someone help?
Thanks,