Skip to content

Instantly share code, notes, and snippets.

View JohnPetros's full-sized avatar
🐼
Probably coding

João Pedro Carvalho JohnPetros

🐼
Probably coding
  • Brazil
View GitHub Profile
@aphilas
aphilas / zustand-immer-persist.ts
Created October 13, 2022 19:00
Zustand with immer and persist
import create, { StateCreator } from "zustand"
import { persist } from "zustand/middleware"
import { immer } from "zustand/middleware/immer"
// Custom persist storage
import { zustandStorage } from "@app/services/zustand"
export interface Entry {
sourceId: string
quantity: number
unitPrice: number