Documentation
Getting Started
Functions
Guides
Concepts
Installation
How to install Next Query in your projectTo install Next Query in your project, follow these steps:
Begin by adding Next Query to your project:
npm install @bigbang-sdk/next-query
Next Query uses API route handlers under the hood to process requests and handle revalidations.
To enable this, you need to set up a catch-all route handler in your Next.js project to handle API requests made by Next Query.
Create a new file in your project to match the route /api/next-query/*/. This route will handle all fetch requests from Next Query.
import { revalidateTag } from "next/cache";
import { routeHandler } from "@bigbang-sdk/next-query";
export const { GET, POST } = routeHandler(revalidateTag);
Made with
by Bigbang