Comparison | React Location vs React Router

Before you commit to a new tool, it's always nice to know how it stacks up against the competition!

This comparison table strives to be as accurate and as unbiased as possible. If you use any of these libraries and feel the information could be improved, feel free to suggest changes (with notes or evidence of claims) using the "Edit this page on Github" link at the bottom of this page.

Feature/Capability Key:

  • ✅ 1st-class, built-in, and ready to use with no added configuration or code
  • 🟢 Full Support as an official plugin or addon package
  • 🟡 Partial Support
  • 🔶 Possible, but requires custom code/implementation
  • 🛑 Not officially supported
React LocationReact Router DOM (Website)
Github Repo / Stars
Their Comparison(none)
Bundle Size (react-location) (react-router-dom)
- (history)
Nested / Layout Routes
Path Params
JSX Routes🟢 react-location-elements-to-routes
Ranked Routes🟢 react-location-ranked-routes
Active Link Customization
Route Mount/Transition/Unmount Events🛑
Official Devtools🟢 react-location-devtools🛑
Search Params
Basic Search Params
Search Param Hooks
Integrated <Link/> search param API🟡 (search-string only via the to prop)
Integrated useNavigate search param API🟡 (search-string only via the search property)
JSON Search Params🔶
Search Param Stabilization (Structural Sharing)🔶
Custom Search Param parsing/serialization🔶
Queued/Batched Search Param Updates🛑
Search-Based Route Matching🟡 (string/Regex only?)
Search Param Compression🟢 react-location-jsurl🔶
Async Routing, Loaders & Data
Route Loaders & Data (parallelized and blocking)🛑
Basic Route Data Caching🛑
Route Loader Prefetching🛑
External Caching Interface🛑
Route Error Elements🛑
Route Pending Elements🛑
Pending Timing (delay, min-show)🛑
Was this page helpful?


Subscribe to Bytes

The best JavaScript newsletter! Delivered every Monday to over 76,000 devs.


No spam. Unsubscribe at any time.

© 2020 Tanner Linsley. All rights reserved.