Simple question here: In Meteor with React how do I pass a parameter to .jsx . I want to send the :token param to my jsx so I can use it after the form submit.
I'm using kadira's flow-router and react-layout packages
Route
FlowRouter.route('/reset/:token',{
name: 'reset',
action: function(params){
ReactLayout.render(App, {
content: <Reset token={params.token} />
})
}
})
Reset.jsx
Reset = React.createClass({
resetPass(e){
e.preventDefault();
alert("test");
},
render() {
return (
<form onSubmit={this.resetPass}>
<input type="password" id="password"/>
<input type="password" id="confirmation"/><br /><br />
<input type="submit" id="reset-button" value="Reset password" />
</form>
);
}
})
Solved
I can get the info with
this.props.token