Skip to content

mahmodghnaj/react-query-global-errors

Repository files navigation

React Query Error Handling with Next.js

This repository serves as an example and guide for handling global errors in React Query with Next.js. It demonstrates how to set up error boundaries, integrate error handling with React Query, and provides a simple Next.js application as a practical example.

Features

  • React Query Integration: Illustrates how to integrate React Query for managing API requests.
  • Global Error Handling: Demonstrates strategies for handling errors globally in a React application.
  • Next.js Setup: Provides a basic setup using Next.js for server-side rendering and client-side navigation.

Getting Started

Prerequisites

Make sure you have Node.js installed on your machine.

Installation

  1. Clone the repository:

    git clone https://github.com/mahmodghnaj/react-query-global-errors
    
    cd global-error-react-query
    
    npm install
    
    npm run dev