Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Sebastianbrg
Created March 1, 2016 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sebastianbrg/2e8970ed64094295493c to your computer and use it in GitHub Desktop.
Save Sebastianbrg/2e8970ed64094295493c to your computer and use it in GitHub Desktop.
Cookies = React.createClass({
render() {
return (
<div className="cookie">
<h3>I'd like to eat a <span style={{color: 'orange'}}>{this.props.cookie}</span> cookie.</h3>
</div>
);
}
});
App = React.createClass({
render() {
return (
<div class="app-root">
<div class="container">
<Cookies />
</div>
</div>
);
}
});
FlowRouter.route( '/cookies/:cookie', {
name: 'cookies',
action( params ) {
ReactLayout.render( App, { yield: <Cookies cookie={params.cookie} /> } );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment