Open WontSeeMeComin opened 2 years ago
Forgot to mention, here is where persist
is coming from:
//utils/persist.ts
import { configurePersist } from 'zustand-persist'
const { persist, purge } = configurePersist({
storage: localStorage,
})
export default persist
export { purge }
Hi, I am trying to get this working with a Typescript React project I am working on, but I'm getting an incomprehensible type error and it's keeping me from successfully configuring this.
I pulled your example code from the README into my local VS Code after installing
0.4.0
. Here is the error I'm seeing in the IDE:So the two important parts seem to be
Types of parameters '$$storeMutations' and '$$storeMutations' are incompatible.
and the lastType '[]' provides no match for the signature ....
section. I just lack the skill to be able to discern what is wrong and what must be changed.I tried looking for a
@types/zustand-persist
thinking my type definitions were old but no such package exists.Here are my deps in case it's helpful:
Could it be that this version not compatible with the latest Zustand? Thanks.