fix(docs): resolve different section linking behavior with special characters (#1640)

This commit is contained in:
Blazej Sewera 2023-02-17 13:36:52 +01:00 committed by GitHub
parent c1970e9358
commit fbfcdc54e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,12 +405,12 @@ is not logged in because it's the default,
but in reality the store has not been hydrated yet.
If your app does depends on the persisted state at page load,
see [_How can I check if my store has been hydrated?_](#how-can-i-check-if-my-store-has-been-hydrated)
see [_How can I check if my store has been hydrated_](#how-can-i-check-if-my-store-has-been-hydrated)
in the [FAQ](#faq) section below.
## FAQ
### How can I check if my store has been hydrated?
### How can I check if my store has been hydrated
There are a few different ways to do this.
@ -478,7 +478,7 @@ const useHydration = () => {
}
```
### How can I use a custom storage engine?
### How can I use a custom storage engine
If the storage you want to use does not match the expected API, you can create your own storage:
@ -517,7 +517,7 @@ export const useBoundStore = create(
)
```
### How can I rehydrate on storage event?
### How can I rehydrate on storage event
You can use the Persist API to create your own implementation,
similar to the example below:
@ -543,7 +543,7 @@ const useBoundStore = create(persist(...))
withStorageDOMEvents(useBoundStore)
```
### How do I use it with TypeScript?
### How do I use it with TypeScript
Basic typescript usage doesn't require anything special
except for writing `create<State>()(...)` instead of `create(...)`.
@ -572,7 +572,7 @@ export const useBearStore = create<MyState>()(
)
```
### How do I use it with Map and Set?
### How do I use it with Map and Set
With the previous persist API, you would use `serialize`/`deserialize`
to deal with `Map` and `Set` and convert them into