From a3072299be00c9757a6a69ff72c0ecbbdb7c82fd Mon Sep 17 00:00:00 2001 From: Danilo Britto Date: Wed, 16 Oct 2024 09:08:57 -0500 Subject: [PATCH] chore: fix middleware imports --- docs/middlewares/combine.md | 2 +- docs/middlewares/devtools.md | 4 ++-- docs/middlewares/redux.md | 2 +- docs/middlewares/subscribe-with-selector.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/middlewares/combine.md b/docs/middlewares/combine.md index ce8002f8bf..80be0d6c0e 100644 --- a/docs/middlewares/combine.md +++ b/docs/middlewares/combine.md @@ -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) => ({ diff --git a/docs/middlewares/devtools.md b/docs/middlewares/devtools.md index e241c498e0..6ac3a3a24d 100644 --- a/docs/middlewares/devtools.md +++ b/docs/middlewares/devtools.md @@ -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 diff --git a/docs/middlewares/redux.md b/docs/middlewares/redux.md index 91c7034b1d..1f6404e334 100644 --- a/docs/middlewares/redux.md +++ b/docs/middlewares/redux.md @@ -57,7 +57,7 @@ redux(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 diff --git a/docs/middlewares/subscribe-with-selector.md b/docs/middlewares/subscribe-with-selector.md index db41b68254..d6ea917fd2 100644 --- a/docs/middlewares/subscribe-with-selector.md +++ b/docs/middlewares/subscribe-with-selector.md @@ -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 } }