Skip to content

Commit

Permalink
chore: fix middleware imports (#2798)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbritto-dev authored Oct 16, 2024
1 parent 0007ef4 commit cce8d5b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/middlewares/combine.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ don’t 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) => ({
Expand Down
4 changes: 2 additions & 2 deletions docs/middlewares/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/middlewares/redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/middlewares/subscribe-with-selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }

Expand Down

0 comments on commit cce8d5b

Please sign in to comment.