https://github.com/bitfancy/react-query-zustand
https://github.com/bitfancy/react-query-zustand
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitfancy/react-query-zustand
- Owner: BitFancy
- Created: 2024-01-19T14:35:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-19T14:36:44.000Z (about 2 years ago)
- Last Synced: 2025-02-15T20:54:18.983Z (about 1 year ago)
- Language: TypeScript
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Description
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.
#### Notes
- 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
)
);
```
#### Project status
- [ ] Design UI/UX
- [x] Create React App ( Vite )
- [x] Create Custom Hook
- [x] Add React-Query
- [x] Add Zustand
- [x] Create a Global Store using Zustand
- [ ] Unit testing
- [ ] Production
| Name | Time to complete | Current Status | Finished |
|------------|---------------|----------------|------------------------------------|
| React-Query-Zustand |1 day | Completed | ✅ done
#### Project Stack
\#React, \#React-Query, \#Zustand, \#GithubAPI