chore: fix middleware imports (#2798)

This commit is contained in:
Danilo Britto 2024-10-16 09:12:01 -05:00 committed by GitHub
parent 0007ef43a8
commit cce8d5b22e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ dont need to define them explicitly.
```ts
import { createStore } from 'zustand/vanilla'
import { combine } from 'zustand/middleware/combine'
import { combine } from 'zustand/middleware'
const positionStore = createStore(
combine({ position: { x: 0, y: 0 } }, (set) => ({

View File

@ -99,7 +99,7 @@ This example shows you how you can use `Redux Devtools` to debug a Slices patter
```ts
import { create, StateCreator } from 'zustand'
import { devtools } from 'zustand/middleware/devtools'
import { devtools } from 'zustand/middleware'
type BearSlice = {
bears: number
@ -167,7 +167,7 @@ For instance the next example doesn't have action type name:
```ts
import { create, StateCreator } from 'zustand'
import { devtools } from 'zustand/middleware/devtools'
import { devtools } from 'zustand/middleware'
type BearSlice = {
bears: number

View File

@ -57,7 +57,7 @@ redux<T, A>(reducerFn: (state: T, action: A) => T, initialState: T): StateCreato
```ts
import { createStore } from 'zustand/vanilla'
import { redux } from 'zustand/middleware/redux'
import { redux } from 'zustand/middleware'
type PersonStoreState = {
firstName: string

View File

@ -57,7 +57,7 @@ partial state updates. We can use `subscribe` for external state management.
```ts
import { createStore } from 'zustand/vanilla'
import { subscribeWithSelector } from 'zustand/middleware/subscribeWithSelector'
import { subscribeWithSelector } from 'zustand/middleware'
type PositionStoreState = { position: { x: number; y: number } }