I have a signup form and after a user signs up, it will redirect to the email confirmation page(/confirmation) where a user types a confirmation code that I sent via an email. W
if you don't want to lose state upon a page refresh you can use local storage:
handleSubmit() {
localStorage.setItem('email',
JSON.stringify(this.state.email));
}
and then retrieve from local storage on any other page, perhaps in componentWillMount:
componentWillMount(){
let email = '';
if (localStorage && localStorage.getItem('email')) {
email = JSON.parse(localStorage.getItem('email'));
}
this.setState({email: email})
}