28 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
Chris Olmsted
5b8abb2f70
docs: added 'zukeeper' to integrations/third-party-libraries (#1670) 2023-03-02 09:45:08 +09:00
Blazej Sewera
fbfcdc54e6
fix(docs): resolve different section linking behavior with special characters (#1640) 2023-02-17 21:36:52 +09:00
Devin Deng
c1970e9358
docs: add zustand-vue/zustand-pub in third-party-libraries.md and run prettier (#1633) 2023-02-14 11:45:53 +09:00
Sajad Torkamani
3788fe3652
Fix typo (#1606) 2023-02-08 07:17:22 +09:00
João Paulo Lousada
67f06df9be
docs: include "ngx-zustand" to third-party-libraries.md (#1605) 2023-02-07 11:21:10 +09:00
nitedani
9cf71d2927
Update third-party-libraries.md (#1544)
Add my library, [zustand-querystring](https://github.com/nitedani/zustand-querystring)
2023-01-16 18:32:48 +09:00
Charles Kornoelje
3c03e40f93
Add zustand-di (#1532)
Add zustand-di third-party package in anticipation of `createContext` from `zustand/context` being removed in v5 of zustand.
2023-01-11 14:23:10 +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
Blazej Sewera
4a99653967
docs(#1220): revise immer middleware page (#1479)
- fix case in naming,
- check if the code snippets are up-to-date
2022-12-21 11:35:17 +09:00
Blazej Sewera
b1cea640c8
Revise the third-party libraries documentation page (#1478)
* docs(#1220): third-party libraries page revision

- Make Zustand name always start from a capital letter,
- Unify list formatting and description style,
- Change minuses to em-dashes,
- Change 3rd to third.

* docs(#1220): update links from 3rd-party to third-party
2022-12-15 12:26:09 +09:00
Shivom Srivastava
86c1985191
Update updating-draft-states.md (#1476)
grammer
2022-12-11 09:50:27 +09:00
Daishi Kato
7f79df4b04
Update 3rd-party-libraries.md (#1465) 2022-12-05 12:12:27 +09:00
Eugene Chybisov
bf9d0922fe
fix(docs): fix to -> do typo (#1453) 2022-11-30 08:06:36 +09:00
Christian van der Loo
d81ac58b15
Update 3rd-party-libraries.md (#1426)
Adds my zustand-computed library, which is updated to match the latest API version and supports the proper typing like detailed in your examples.
2022-11-12 15:09:16 +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
Joel Mathew Koshy
200d5bc10e
docs(immer-doc): add npm installation section in immer middleware docs (#1347) 2022-10-07 01:09:13 +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
Danilo Britto
eea3944499
fix(docs): move gotchas to docs/getting-started section (#1283)
* fix(docs): move gotchas to docs/getting-started section

* Minor changes

* Move gotchas to docs/guides section

* Update updating nested state object values to cross-link gotchas

* Minor changes

* Clean up

* Add updating draft states to docs/integrations for immer middleware

* Minor changes

* Update updating draft states to add demos

* Minor changes

* Minor changes

* Minor fixes
2022-09-15 19:10:07 +09:00
Chris K
b85f6413f1
docs(issue-1215): restructure top level docs (#1222) 2022-08-25 19:34:32 +09:00