Skip to content

thanhdaon/nextjs-react-query-best-practices

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Overview

This project demo a typical table view that using react-query with best practices.

Tech stack

  • NextJs 14
  • React-query
  • Zod
  • Shadcn
  • Pnpm
  • Typescript

Checklist

  • Custom column
  • All states store in url params
  • Fully type-safe
  • Caching
  • Loading without layout shift
  • Filters
  • Pagination
  • Create more items
  • Delete item
  • Update item / Optimistic Update
  • Suspend / Streaming data from server

Deploy on Vercel

Contributors 2

  •  
  •  

Languages