I'm passing a jsx element when doing a redirection via router.push
from registration to login.
Register:
this.props.router.push({
pathname: "/login",
state: {
intro: (<p>I'm a secret message from registration page</p>)
}
})
In the Login constructor I have:
if (this.props.location.state && this.props.location.state.intro) {
this.state.intro = this.props.location.state.intro
}
It works fine for the first time. But when I refresh the Login page, I get:
Uncaught Error: Objects are not valid as a React child (found: object with keys {type, key, ref, props, _owner, _store}).
I have created a code sample to better illustrate my problem.