My route looks like this:
So naturally, since info messages are on every page and are all the same, they should be called from App. Without routing this would be no problem as I would just pass the function down the chain as prop and call it when needed. However when I am using router this gets complicated. I tried this approach, but map is returning empty array. Also the fact that such functionality is not integrated makes me think there is another approach, but I am unable to find it. So how would you, people with more react experience, do it?
<Router history={browserHistory}>
<Route path="/" component={App}>
<IndexRoute component={HomeView}/>
<Route path="/login" component={LoginView}/>
<Route path="/register" component={RegisterView}/>
<Route path="/createBook" component={CreateBookView}/>
<Route path="/listBooks" component={ListBooksView}/>
<Route path="/listBooks/:bookData" component={EditBookView}/>
</Route>
</Router>
My message component is as simple as it gets - 2 different selectors for message / error styles and the message info, both coming from props.