I'm using Redux, redux-router and reactjs.
I'm trying to make an app where I fetch information on route change, so, I've something like:
<Route path=/ component={App}>
<Route path=artist component={ArtistApp} />
<Route path=artist/:artistId component={ArtistApp} />
</Route>
When someone enters to artist/<artistId>
I want to search for the artist and then render the information. The question is, what it's the best way of doing this?
I've found some answers about it, using RxJS or trying a middleware to manage the requests. Now, my question is, Is this really necessary or just a way to keep the architecture react-agnostic? Can I just fetch the information I need from react componentDidMount() and componentDidUpdate() instead? Right now I'm doing this by triggering an action in those functions that request information and the component re-renders when the information has arrived. The component has some properties for letting me know that:
{
isFetching: true,
entity : {}
}
Thanks!