I am trying to get the background color to change but to no avail
var App = React.createClass({
render: function() {
var bodyStyle = {
color: "#888",
fontSize: "20",
backgroundColor: this.props.bgcolor,
};
return (
<div>
<h1>Simple SPA</h1>
<ul className="header">
<li><IndexLink to="/" activeClassName="active">Home</IndexLink></li>
<li><Link to="/stuff" activeClassName="active">Stuff</Link></li>
<li><Link to="/contact" activeClassName="active">Contact</Link></li>
</ul>
<div className="content" style={bodyStyle}>
{this.props.children}
</div>
</div>
)
}
});
but am not sure if you can add properties in the route path?
var destination = document.querySelector("#container");
ReactDOM.render(
<Router history={ReactRouter.hashHistory}>
<Route path="/" component={App} >
<IndexRoute component={Home} bgcolor="#FF6633" />
<Route path="stuff" component={Stuff} bgcolor="#FFF" />
<Route path="contact" component={Contact} bgcolor="#000000" />
</Route>
</Router>,
destination
);