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.