How redux-first-history works: The single source of truth
masterThe core goal of redux-first-history is to make the Redux store the 100% single and only source of truth for routing.
In traditional setups, components might get location from Redux, others from Router context, and others from HOCs, leading to synchronization issues. With redux-first-history, all routing information is tunneled to state.router.location. This ensures that regardless of which router library you use (react-router, @reach/router, wouter, etc.), the location state is always consistent across the entire application. This eliminates synchronization issues and improves React shallowCompare rendering optimizations.