docs: add currying in for createStore (#3171)

This commit is contained in:
soyboi 2025-07-09 16:51:58 +03:00 committed by GitHub
parent 149c286342
commit 56909808fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,7 +99,7 @@ interface BearState {
increment: () => void
}
const store = createStore<BearState>((set) => ({
const store = createStore<BearState>()((set) => ({
bears: 0,
increase: (by) => set((state) => ({ bears: state.bears + by })),
increment: () => set((state) => ({ bears: state.bears + 1 })),