* Add zustand-expo-devtools to third-party middleware list
Wrote a dev plugin that allows for full connection between zustand state and redux devtools!
* ordered alphabetically
* Persist documentation for Map & Set add storage and retrieval of version
--HG--
branch : discussion-2689-persist-doc-map-and-set-missing-version
* Persist documentation for Map & set improve getItem to include version only when present by way of spread operator on existingValue
--HG--
branch : discussion-2689-persist-doc-map-and-set-missing-version
* Adding zustand-boilerplate to third-party-libraries
Hi,
I'm the maker of zustand-boilerplate. It's a small utility that generates getters, setters based on a class representing a zustand store. I'd like to add it to the list of 3rd party libraries to let people know. I've attached an example:
```
import { create } from "zustand"
import * as Z from "zustand-boilerplate"
interface Bear {
name: string
}
class BearStore {
@Z.Boolean()
isDangerous = false
@Z.Number()
count = 0
@Z.Array()
bears: Bear[] = []
//
// Notice you have to set a default value and apply the decorator
// to properties for generated actions to work
//
@Z.Any()
mainBear: Bear | undefined = undefined
@Z.String()
userName: string | undefined = undefined
}
const bearStoreWithActions = Z.generateStoreWithActions(BearStore)
export const store = create(bearStoreWithActions)
// The following will automatically work now (fully typed)
// store.getState().getBears() -> Bear[]
// store.getState().setBears(bears)
// ...
```
* chore: a-z ordering
* doc: Added zustand-interval-persist to third party
* doc: added zustand-interval-persist to third party in alphabetical order.
* doc: re-arranged zustand-interval-persist order, zundo and zukeeper
* Update third-party-libraries.md
* docs: order davstack store link alphabetically
* docs: add link to 3rd party autogenerated selectors library
* Update docs/integrations/third-party-libraries.md
change the dash
Co-authored-by: Blazej Sewera <code@sewera.dev>
---------
Co-authored-by: Blazej Sewera <code@sewera.dev>
* Update third-party-libraries.md
Adding zustand dev tool made by oslabs to the third party libraries.
* Update third-party-libraries.md
changed to alphabetical order
* Update third-party-libraries.md
formatted with prettier/which got rid of the extra space on line 17
* docs: update documentation of persist
Add superjson serialization/deserialization example to Zustand persist documentation
* docs: fix spelling documentation of persist
* docs: Apply feedback by moving content under custom storage engine and specifying that the code is an example
* docs: Update variable name to example name and separate storage as const
The initialization type of `useState` is incorrect. hydrated needs to be of boolean type, whereas the original `useBoundStore.persist.hasHydrated` is a function. This will lead to errors, such as during the static build of frameworks like Next.js.
* Add section for usage of persist middleware with NextJS
I have spent the last 1h30m trying to find the solution for `Hydration failed because the initial UI does not match what was rendered on the server` and after digging a lot I found the solution.
So i thought: Maybe this could be on official documentation!
So I made it. It's just copy and paste but at least it will be easier for future folks trying to solve the same problem
* ran yarn prettier
* fix typos
* Update docs/integrations/persisting-store-data.md
Co-authored-by: Blazej Sewera <code@sewera.dev>
* splitting long lines into smaller ones
following the suggestion of PR
* commit suggestion of changes in PR
Co-authored-by: Blazej Sewera <code@sewera.dev>
* commit suggestion of changes in PR
Co-authored-by: Blazej Sewera <code@sewera.dev>
* commit suggestion of changes in PR
Co-authored-by: Blazej Sewera <code@sewera.dev>
* commit suggestion of changes in PR
Co-authored-by: Blazej Sewera <code@sewera.dev>
* applying changes requested in PR
---------
Co-authored-by: Blazej Sewera <code@sewera.dev>