Home
Demo
next-query-glue

Dev blog with fastest navigation possible.

That website demonstrates consistently fast navigation via optimistic UI. Navigation stays responsive regardless of the Internet speed or CPU performance. Click on any card below to see it.

Powered by next-query-glue and react-query.

Running Next.js navigation through react-query

In next.js pages router, every client navigation to routes with getServerSideProps/getStaticProps triggers a fetch request. What if we could run those client-side fetch requests through a client-side fetch library like react-query? I've created a next-query-glue library that allows you to do it. It brings a lot of control over data requests and greatly improves the user experience.

Three ways to achieve instant navigation

Links in next.js feels laggy if the user has slow internet / server response with delays / serverless function hits a cold start. It ruins UX. And most likely, users will click fewer links because of those delays. If every link always opened instantly, users would be more active on the website. Fast navigation improves UX, user engagement, and positively impacts SEO. Let's look at three ways to achieve instant navigation.