30 Commits

Author SHA1 Message Date
Danilo Britto
36627acb60
Update persisting-store-data.md (#3110) 2025-05-06 14:32:23 -05:00
Daniil Chervyakov
c3287fa89d
docs: fix typo in type (#3001) 2025-02-07 12:54:54 +09:00
sidahmedabdelillah
bc3e94e991
fixed error in persist example and added typescript (#2978)
* fixed error in persist example and added typescript

* chore: formatted code

---------

Co-authored-by: sidahmedabdelillah <s_bentegar@gmail.com>
2025-01-28 07:59:26 -05:00
Chafic Najjar
eac9dad35b
Fix "previous" and "next" navigation links (#2777) 2024-10-08 07:11:45 -05:00
melutovich
23086be4ad
Persist documentation for Map & Set add storage and retrieval of version (#2692)
* 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
2024-08-21 08:52:45 +09:00
Jesper Sørensen
2875d0717d
Fix store-persistence example (#2667) 2024-08-07 19:27:01 -05:00
donutcube
e13777495a
Update persisting-store-data.md (#2650) 2024-07-18 09:03:29 +09:00
Charles Kornoelje
27bffb1fba
docs(persist): add info about createJSONStorage helpful function (#2299)
* first pass at docs

* add jump-to-section
2024-01-20 14:17:05 +09:00
Charles Kornoelje
41838c5187
chore(docs): rewrite to remove deprecated references in persist docs (#2248)
* chore(docs): rewrite to remove deprecated references in persist docs

* chore(docs): remove deprecated equalityFn
2023-12-14 08:05:20 +09:00
Daishi Kato
9857a676a9
refactor: revisit prettier config to be minimal (#2193) 2023-11-14 12:19:51 +09:00
권신학
492637a880
docs: update documentation of persist (#2147)
* 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
2023-11-01 10:35:03 +09:00
Aykut Kardaş
5493959646
docs: update persisting-store-data.md (#1993) 2023-08-15 08:30:19 +09:00
Itay
c5e7c30660
avoid 'any' errors and make example clearer (#1957) 2023-07-26 16:29:17 +09:00
Surya Vivek
58947a5bf9
docs: fix typo 'with be' to 'will be' (#1906) 2023-06-30 09:03:15 +09:00
203X
ac4ec46bd6
fix useHydration hook (#1826)
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.
2023-05-27 07:49:28 +09:00
Nipodemos
65d2bc0660
Add section for usage of persist middleware with NextJS (#1782)
* 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>
2023-05-08 08:25:00 +09:00
Arvin Xu
a999f7ac04
docs: fix document error of persist with hydration (#1758)
* docs: fix document error of persist with hydration

* Update persisting-store-data.md

* Apply suggestions from code review

Co-authored-by: Blazej Sewera <code@sewera.dev>

* Update persisting-store-data.md

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
2023-04-18 18:49:56 +09:00
George Manning
38c905564c
feat(middleware/persist): add skip hydration option #405 (#1647)
* add manual hydration option to persist middleware

* rename variable, update jsdoc, remove from oldImpl

* add tests for persist skipHydration

* add docs

* Update docs/integrations/persisting-store-data.md

Co-authored-by: Blazej Sewera <code@sewera.dev>

* Update docs/integrations/persisting-store-data.md

Co-authored-by: Blazej Sewera <code@sewera.dev>

* Update src/middleware/persist.ts

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Co-authored-by: Blazej Sewera <code@sewera.dev>
2023-03-31 20:20:16 +09:00
Kevin Jiang
0ee21f8dbc
Update imports (#1674) 2023-03-04 19:44:36 +09:00
Blazej Sewera
fbfcdc54e6
fix(docs): resolve different section linking behavior with special characters (#1640) 2023-02-17 21:36:52 +09:00
Sajad Torkamani
3788fe3652
Fix typo (#1606) 2023-02-08 07:17:22 +09:00
William
725c2c0cc0
doc: update documentation of persist (#1512)
* update documentation of persist to include how to handle Map and Set with the new persist API

* run prettier

* Update docs/integrations/persisting-store-data.md

Co-authored-by: Chris K <55621012+chrisk-7777@users.noreply.github.com>

* Update docs/integrations/persisting-store-data.md

Co-authored-by: Chris K <55621012+chrisk-7777@users.noreply.github.com>

* Update docs/integrations/persisting-store-data.md

Co-authored-by: Blazej Sewera <code@sewera.dev>

* edit suggestions

* fix comment

Co-authored-by: Chris K <55621012+chrisk-7777@users.noreply.github.com>
Co-authored-by: Blazej Sewera <code@sewera.dev>
2023-01-10 18:20:03 +09:00
Daishi Kato
0b55a3d74b
feat: deprecate default export (#1514) 2023-01-10 18:13:25 +09:00
Charles Kornoelje
86c5016e28
Update persist documentation for storage (#1521)
This replaces `getStorage` with `storage`.

This PR raises two questions:
- Should we write documentation on how to migrate from the `getStorage` API to the `storage` API?
- Should we version the middleware separately from the zustand core?
2023-01-10 08:09:01 +09:00
Daishi Kato
1e986ec97f
feat(middleware/persist): new storage option (#1463)
* feat(middleware/persist): new storage option

* fix typo
2023-01-01 09:57:19 +09:00
Blazej Sewera
a8c98d6c54
Revise Persisting store data doc page (#1497)
* docs(#1220): revise persisting-store-data page

- add cross-links
- add line breaks for easier Markdown reading
- unify Persist middleware spelling
- change fishes to bears, because the plural of fish is fish,
  and it would be less readable
- make sentences more concise

* docs(#1220): make the sentences more concise

* docs(#1220): unify formatting of methods
2022-12-30 14:29:19 +09:00
Will McBride
d3596a6a73
Persisting store doc href hash fixes and tweaks (#1398)
* chore(docs): Fix casing in Persist middleware docs

* docs: Remove unhelpful 'see below' and make other more helpful

* docs: Remove link incompatible between GH & Docs site.
2022-11-03 21:58:59 +09:00
Srinivasan Mohan
cf0bef6d5e
spelling correction (#1357) 2022-10-12 20:51:33 +09:00
Jacob Bergholtz
4ed81bc11b
Add usage with context to docs (#1291)
* docs: context guide proposal

* fix(docs): typo & omit comment

* fix(docs): remove horizontal rules

* fix(docs): add wiki link to DI

* fix(docs): format with prettier

* fix(docs): cases that model => where... is needed

* fix(docs): use sentence case

* fix(docs): omit quote block

* fix(docs): into "a" custom hook

* fix(docs): format with prettier

* fix(docs): sort broken nav indexes

* Update docs/guides/initialize-state-with-props.md

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>

* fix(docs): reintroduce React.createContext example

* scripts: escape quotes

* styles: run prettier

* fix(docs): omit 'React' from imports

* styles: run prettier

* styles: run prettier

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2022-09-18 09:01:06 +09:00
Chris K
b85f6413f1
docs(issue-1215): restructure top level docs (#1222) 2022-08-25 19:34:32 +09:00