I'm new to ReactJS. I have a problem with React Router v4 and need some advice from you guys. In my application (React + Redux), I'm configuring my route:
/app/:appId/detail
/app/:appId/config/:store
/app/:appId/gifts
And render 2 components at the same time. A select component (allow change appId) and a main component (showing data).
Suppose that I'm in /app/1/detail with appId is 1 and showing a detail from application 1. When I press change application to 2, I want to change my url like /app/2/detail and change data to application 2 by the time. (means matching :appId to 2)
I know that I can dispatch an action with Redux then DetailComponent (or ConfigComponent/GiftsComponent) can catch it and change manual from inside component (every component) by using history.push or history.replace. My application have a lot of components, manual handling can increase complexity in my app, so it is not a good way to resolve it.
Help me if having any solution. Thank you very much.