Why you don’t need to mix routing state with Redux
Blog post from LogRocket
This article explores the integration of routing state with Redux in React applications, detailing the available libraries and methods for achieving this, such as connected-react-router, react-router-dom, redux-first-router, and redux-first-history. It outlines how Redux, a state management tool, can maintain synchronization between browser history and the application state through its Store, which serves as the single source of truth. However, it argues that incorporating routing state into Redux introduces unnecessary complexity, multiple sources of truth, verbosity, and code redundancy, which can hinder scalability and maintainability. Instead, it suggests using alternative solutions like React Router, which offers dynamic route-matching, browser history features, and lazy loading, to simplify routing management in React applications. The article concludes that while Redux-first routing provides certain advantages, these can be achieved more efficiently and straightforwardly using simpler client-side routing solutions.