Skip to content

Commit a3869ca

Browse files
authored
docs: fix broken links in beginner TypeScript guide (#3423)
1 parent c49df38 commit a3869ca

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/learn/guides/beginner-typescript.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Sometimes you need more than one property. Returning an object from the selector
145145
However, directly destructuring properties from that object can cause unnecessary re-renders.
146146
To avoid this, it’s recommended to wrap the selector with `useShallow`, which prevents re-renders when the selected values remain shallowly equal.
147147
This 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
151151
import { create } from 'zustand'
@@ -209,7 +209,7 @@ function TotalFood() {
209209
This middleware separates initial state and actions, making the code cleaner.
210210
TS automatically infers types from the state and actions, no interface needed.
211211
This 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
215215
import { create } from 'zustand'
@@ -232,7 +232,7 @@ export const useBearStore = create<BearState>()(
232232

233233
This middleware connects Zustand to Redux DevTools. You can inspect changes, time-travel, and debug state.
234234
It’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
238238
import { create } from 'zustand'
@@ -255,7 +255,7 @@ export const useBearStore = create<BearState>()(
255255

256256
This middleware keeps your store in `localStorage` (or another storage). This means your bears survive a page refresh.
257257
Great 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
261261
import { create } from 'zustand'
@@ -309,7 +309,7 @@ export const useBearStore = create<BearState>()((set) => ({
309309

310310
Variant of `create` with equality built-in. Useful if you always want custom equality checks.
311311
Not 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
315315
import { createWithEqualityFn } from 'zustand/traditional'

0 commit comments

Comments
 (0)