15 Commits

Author SHA1 Message Date
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