Powerful, enterprise-grade routing for React applications with 1st class support for asynchronous route elements and data loaders, Search Param APIs, nested-routing, code-splitting and so much more.
Hi everyone!
I'm so excited to finally show you the powerful, enterprise-grade router I've been building for my React apps over the last few months.
Here are some of its core features at a glance:
- Asynchronous routing
- Promise-based data loaders
- Asynchronous route elements
- Threshold-based pending route elements
- Error boundary route elements
- Code-splitting
- Post-render async loader APIs (stale-while-revalidate, external cache integration)
- Navigation batching with graceful replace/push escalation
- Deeply integrated Search Params API
- JSON-first Search Params
- Full and useNavigate integrtion
- Full cmd+click support
- Search Param Immutability w/ Structural Sharing
- Batched Updates / Functional Updates
- Route Matching
- Optional Compression w/ JSURL plugin or your own custom parser/serializer!
- Hooks for everything: Router, Matches, Route Matching, Preloading
- Optional route filtering/ranking
- Optional JSX route definitions
- Prepackaged simple cache implementation for route loader caching
- Easy Integration w/ external caches and storage (eg. React Query, Apollo, SWR, RTKQuery)
- SSR route matching, loading & hydration (coming soon)
I've put a lot of work and thought into this router to power all of the crazy stuff we're doing over at Nozzle.io (it's SAAS app to be specific). Similar to React Query, every byte I've put into React Location is an investment into both DX and UX for your app. I'm confident that this router is going to move the needle for both devs and users and can't wait to see it evolve even further.
Not all applications need SSR - but unfortunately the majority of the improvements made in the React ecosystem over the last year have heavily favored applications that do. This is a great thing! But it's exciting to see react-location focusing on client applications and delivering the same improved DX that we've largely been missing.
While I don't think anyone actively looks forward to migrating such a pivotal element of their application as routing, I am eager to bring in react-location. As usual, excellent work @tannerlinsley!
I had passed off this post until I saw react-query's makers' name on it, and I was like gotta check this out, he never disappoints. Well just make us dummies a easy to understand documentation and we will use it sure!
Replies
Nozzle.io
REST2GraphQL.io
Nozzle.io
Sukha
Nozzle.io
Pager
Nozzle.io