Excellent article. Route components is definitely the way to go if you’re still very new to React.
If you’re at the level where you are considering Redux, Redux-First Router offers a great way to learn Redux while implementing Routing, as it consolidates many complex Redux concepts. It also solves problems you’re likely to run into when combining React Router with Redux.
So for anyone interested, here’s the “beginner’s guide to routing with Redux using Redux-First Router”:
- Part 1: Using State Instead of <Route /> Components
- Part 2: Data-Fetching via Route Thunks instead of Middleware
- Part 3: Server-Render like a Pro in 10 steps (SSR + Redux)
And you can try Redux-First Router out right here right now: