This is a repository for a project where I am learning how to use React-Query and Zustand.
-
React-Query is a library for managing remote and asynchronous data fetching.
-
Zustand is a small, fast and flexible state management library.
- Create Project:
npm create vite react-query-zustand
- Install dependencies:
npm i @tanstack/react-query react-query axios
- create the global store
import { create } from "zustand";
import { persist } from "zustand/middleware";
const useGlobalStore = create(
persist( 👈 middleware
(set) => ({
value: [], 👈 initial state
fn: () => { set((state) => ({})); 👈 update state
},
{ name: "name-storage" } 👈 Localstorage
)
);
- Design UI/UX
- Create React App ( Vite )
- Create Custom Hook
- Add React-Query
- Add Zustand
- Create a Global Store using Zustand
- Unit testing
- Production
Name | Time to complete | Current Status | Finished |
---|---|---|---|
React-Query-Zustand | 1 day | Completed | ✅ done |
#React, #React-Query, #Zustand, #GithubAPI