@@ -145,7 +145,7 @@ Sometimes you need more than one property. Returning an object from the selector
145145However, directly destructuring properties from that object can cause unnecessary re-renders.
146146To avoid this, it’s recommended to wrap the selector with ` useShallow ` , which prevents re-renders when the selected values remain shallowly equal.
147147This is more efficient than subscribing to the whole store. TypeScript ensures you can’t accidentally misspell ` bears ` or ` food ` .
148- See the [ API documentation] ( https://zustand.docs.pmnd.rs/ hooks/use-shallow) for more details on ` useShallow ` .
148+ See the [ API documentation] ( ../../reference/ hooks/use-shallow.md ) for more details on ` useShallow ` .
149149
150150``` tsx
151151import { create } from ' zustand'
@@ -209,7 +209,7 @@ function TotalFood() {
209209This middleware separates initial state and actions, making the code cleaner.
210210TS automatically infers types from the state and actions, no interface needed.
211211This is different from JS, where type safety is missing. It’s a very popular style in TypeScript projects.
212- See the [ API documentation] ( https://zustand.docs.pmnd.rs/ middlewares/combine) for more details.
212+ See the [ API documentation] ( ../../reference/ middlewares/combine.md ) for more details.
213213
214214``` ts
215215import { create } from ' zustand'
@@ -232,7 +232,7 @@ export const useBearStore = create<BearState>()(
232232
233233This middleware connects Zustand to Redux DevTools. You can inspect changes, time-travel, and debug state.
234234It’s extremely useful in development. TS ensures your actions and state remain type-checked even here.
235- See the [ API documentation] ( https://zustand.docs.pmnd.rs/ middlewares/devtools) for more details.
235+ See the [ API documentation] ( ../../reference/ middlewares/devtools.md ) for more details.
236236
237237``` ts
238238import { create } from ' zustand'
@@ -255,7 +255,7 @@ export const useBearStore = create<BearState>()(
255255
256256This middleware keeps your store in ` localStorage ` (or another storage). This means your bears survive a page refresh.
257257Great for apps where persistence matters. In TS, the state type stays consistent, so no runtime surprises.
258- See the [ API documentation] ( https://zustand.docs.pmnd.rs/ middlewares/persist) for more details.
258+ See the [ API documentation] ( ../../reference/ middlewares/persist.md ) for more details.
259259
260260``` ts
261261import { create } from ' zustand'
@@ -309,7 +309,7 @@ export const useBearStore = create<BearState>()((set) => ({
309309
310310Variant of ` create ` with equality built-in. Useful if you always want custom equality checks.
311311Not common, but shows Zustand’s flexibility. TS still keeps full type inference.
312- See the [ API documentation] ( https://zustand.docs.pmnd.rs/ apis/create-with-equality-fn) for more details.
312+ See the [ API documentation] ( ../../reference/ apis/create-with-equality-fn.md ) for more details.
313313
314314``` ts
315315import { createWithEqualityFn } from ' zustand/traditional'
0 commit comments