docs: updates to fix remaining broken links across docs site (#1257)

* docs: updates to fix remaining broken links across docs site

* docs: fix relative links to work in both github and docs site
This commit is contained in:
Chris K 2022-09-15 07:41:03 +10:00 committed by GitHub
parent 7bce12e91b
commit 70820e349c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ const dispatch = useGrumpyStore((state) => state.dispatch)
dispatch({ type: types.increase, by: 2 })
```
You could also use our redux-middleware. It wires up your main reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla api. Check [this example](https://codesandbox.io/s/amazing-kepler-swxol).
You could also use our redux-middleware. It wires up your main reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla api.
```typescript
import { redux } from 'zustand/middleware'

View File

@ -5,7 +5,7 @@ nav: 17
If you're not using the typed version (either via TypeScript or via JSDoc) then there are no breaking changes for you and hence no migration is needed either.
Also it's recommended to first read the new [TypeScript Guide](./typescript.md), it'll be easier to understand the migration.
Also it's recommended to first read the new [TypeScript Guide](../guides/typescript.md), it'll be easier to understand the migration.
In addition to this migration guide you can also check the diff of the test files in the repo from v3 to v4.
@ -54,7 +54,7 @@ If you're not passing any type parameters to `create` then there is no migration
### Migration
If you're using `StateCreator` you're likely authoring a middleware or using the "slices" pattern, for that check the TypeScript Guide's ["Authoring middlewares and advanced usage"](https://github.com/pmndrs/zustand/blob/main/docs/typescript.md#authoring-middlewares-and-advanced-usage) and ["Common recipes"](https://github.com/pmndrs/zustand/blob/main/docs/typescript.md#common-recipes) sections.
If you're using `StateCreator` you're likely authoring a middleware or using the "slices" pattern, for that check the TypeScript Guide's ["Authoring middlewares and advanced usage"](../guides/typescript.md#authoring-middlewares-and-advanced-usage) and ["Common recipes"](../guides/typescript.md#common-recipes) sections.
## `PartialState` (from `zustand` and `zustand/vanilla`)

View File

@ -340,7 +340,7 @@ const dispatch = useStore((state) => state.dispatch)
dispatch({ type: types.increase, by: 2 })
```
Or, just use our redux-middleware. It wires up your main-reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla api. Try [this](https://codesandbox.io/s/amazing-kepler-swxol) example.
Or, just use our redux-middleware. It wires up your main-reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla api.
```jsx
import { redux } from 'zustand/middleware'