showing results for - "how to add css based on route react"
Cristóbal
22 Feb 2016
1// do something when clicking on route 
2
3function handler() {
4  // do something;
5}
6
7<Route path='/' component={App}>
8  <Route path="foo" component={Foo} onEnter={handler}/>
9  <Route path="life" component={Life} onEnter={handler}/>
10</Route>
11