233 Commits

Author SHA1 Message Date
Atticus White
19cb8797bd
Update devtools.md (#2883) 2024-12-06 14:53:22 +09:00
daishi
5ed67ec1a9 chore: remove single quote 2024-11-29 22:26:26 +09:00
marcomendoza
3a7a7fb221
Fix migrating to v5 doc (#2874)
Replace middlware with middleware in md file
2024-11-29 10:49:39 +09:00
Alexander Mordvinov
9281ec1990
fix hydrateRoot args order (#2869) 2024-11-26 16:45:35 -05:00
Facundo J Gonzalez
f540ca8294
chore(docs): Fix the link to devtools (#2861) 2024-11-21 09:14:02 +09:00
Charles Kornoelje
7980a7b9cb
match the typescript docs (#2856) 2024-11-18 08:28:55 +09:00
Minsup Lee
15eaeb7aad
chore(docs): fix typo (#2847) 2024-11-10 10:42:32 -05:00
ytraddan
9782058029
docs: fix typo in tutorial-tic-tac-toe.md (#2836) 2024-11-05 11:30:26 -05:00
ennjin
7fcd59b10d
chore: update third-party-libraries.md (#2834) 2024-11-05 16:46:01 +09:00
Danilo Britto
795528efb5
fix(doc): update tutorial guide and fix doc build (#2835)
* fix(doc): update tutorial guide

* fix(doc): update tutorial guide
2024-11-04 19:43:35 -05:00
Danilo Britto
bf4bcf20c5
chore(docs): update docs content (#2831)
* chore(docs): update docs content

* chore(docs): update types

* chore: update import types
2024-11-05 09:27:34 +09:00
Steven Wexler
dfbed9c6c9
docs: add leo-query to third-party libraries list (#2824)
Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
2024-10-28 23:12:31 -05:00
Prince Raj
f9b5538402
Update use-store.md (#2799)
there is a typo mistake while importing the setposition from positionstore

 wrong : const setPosition = useStore(positionStore, (state) => state.setPositionStore)
correct :  const setPosition = useStore(positionStore, (state) => state.setPosition)
2024-10-18 20:55:13 +09:00
Danilo Britto
cce8d5b22e
chore: fix middleware imports (#2798) 2024-10-16 09:12:01 -05:00
Danilo Britto
211f108ede
Update docs content (#2760)
* Update docs content

* Update docs content

* Update docs content

* Update docs content

* Update docs content

* WIP

* WIP

* Update docs content

* Update create.md

* Update create-with-equality-fn.md

* Update create-store.md

* Update use-store.md

* Update use-store-with-equality-fn.md
2024-10-14 20:44:42 +09:00
Martin Petr
055dcdc7e7
Update third-party-libraries.md (add zustand-hash-storage) (#2785)
* Update third-party-libraries.md

* Update docs/integrations/third-party-libraries.md

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2024-10-12 19:13:09 +09:00
David Sykes
a14af57a85
docs: logo optimization and adding alt (#2784)
* docs: logo optimization and adding alt

* docs: logo optimization and adding alt

* Update docs/getting-started/introduction.md

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2024-10-12 12:24:42 +09:00
goosewobbler
3362f3b765
docs: add zutron to third-party-libs (#2781)
* docs: add zutron to third-party-libs

* Update docs/integrations/third-party-libraries.md

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2024-10-11 10:12:47 +09:00
Chafic Najjar
55630cce47
docs: fix typo in use-shallow.md (#2780) 2024-10-10 07:08:48 -05:00
Chafic Najjar
eac9dad35b
Fix "previous" and "next" navigation links (#2777) 2024-10-08 07:11:45 -05:00
Charles Kornoelje
717f569022
docs: remove State and improve replace typecasting (#2776) 2024-10-06 19:32:48 -05:00
Chafic Najjar
17bc89d735
docs: capitalize first word in subtitle (#2770) 2024-10-05 16:35:21 +09:00
Daishi Kato
29509885a1
chore: v5 migration docs (#2769)
* chore: v5 migration docs

* some fixes
2024-10-04 12:02:30 +09:00
DanThemes
976ae9fb16
Update typescript.md (#2764)
Typo: "That is to say how could **do** we type ..."
2024-10-01 17:41:15 +09:00
David
17b208a91f
docs: fix typo in Prevent rerenders with useShallow section (#2761) 2024-09-30 20:56:25 +09:00
Danilo Britto
6b29015c3b
Update docs (#2756) 2024-09-25 15:54:32 -05:00
Danilo Britto
8b373dd382
Update createStore api docs (#2753) 2024-09-23 08:29:19 -05:00
Daishi Kato
f82f56ddeb
fix(docs): improve v5 migration guide (#2749)
* fix(docs): improve v5 migration guide

* Update docs/migrations/migrating-to-v5.md

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

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
2024-09-22 00:07:52 +09:00
87xie
18c0a3d97d
docs: add plaintext language to code block to prevent layout breaks (#2745) 2024-09-18 12:20:38 +09:00
MJ Studio
fec9135e33
[Zustand Docs] Add third party library zustand-async-slice (#2730) 2024-09-11 10:19:04 +09:00
Danilo Britto
5ebe8606d6
Add getInitialState as part of api utilities (#2729) 2024-09-09 23:34:14 -05:00
Danilo Britto
0a4f9d0f71
Add docs for APIs and Hooks (#2706)
* Add docs for APIs and Hooks

* Minor fixes

* Minor fixes
2024-09-06 12:26:16 -05:00
Antoine BERNIER
7c36942261
relative images as much as possible (#2710) 2024-08-28 20:29:14 +09:00
Tibinko
c0cd364b8f
docs: typo in typescript docs (#2708) 2024-08-28 09:44:04 +09:00
Daishi Kato
42bbfcfb6b
chore(docs): third-pary libs (#2699) 2024-08-26 21:17:00 +09:00
Sugan Krishnan
41043478a0
Update auto-generating-selectors.md (#2695)
Keep the links consistent to github
2024-08-22 18:30:25 +09: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
sagiereder
69112dcfff
Adding zustand-boilerplate to third-party-libraries (#2673)
* 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
2024-08-19 10:20:23 +09:00
Daishi Kato
9b26718d6f
chore: bear.jpg in ./docs (#2684) 2024-08-16 09:48:22 +09:00
Daishi Kato
e247220ece
v5 (#2138)
* prepare for the next major version

* [v5] breaking: drop default exports (#2238)

* fix: drop default exports for v5

* chore: remove default from cjs build

* refactor: export shallow in v5

* fix: remove `addModuleExport` option for cjs.

* [v5] breaking: drop deprecated features (#2235)

* fix: remove deprecated v4 features

* chore(build): remove context

* docs(typescript): remove deprecated equals api

* docs(persist): remove old persist api

* chore: run yarn prettier on typescript docs

* Discard changes to docs/guides/typescript.md

* Discard changes to docs/integrations/persisting-store-data.md

* Discard changes to tests/shallow.test.tsx

* Discard changes to tests/vanilla/subscribe.test.tsx

* [v5] breaking: make React 18 as minimal requirement (#2236)

* fix: update package.json to require react 18+

* chore: update github actions to test on react 18+

* chore: remove devtools-skip hack from actions

* chore(test): remove CI-SKIP from devtools tests

* [v5] breaking: make use-sync-external-store an optional peer dependency (#2237)

* chore: make use-sync-external-store optional peerDep

* fix: use correct versions in package.json

* [v5] breaking: require TypeScript 4.5 and update tests (#2257)

* breaking(types): TS requirement

* wip: latest only

* wip: latest only 2

* drop ts <4.4

* wip: do not skip lib checkes

* use latest node types

* drop ts 4.4

* [v5]: drop "module" condition  (#2270)

* Update package json in order to remove module

* Update rollup config in order to remove module config

* Update patch esm script

* Update package json to general exports and update node version (#2272)

* [v5]: drop UMD/SystemJS builds (#2287)

* Update rollup config in order to drop system js and umd builds

* Update packages

* Clean up files

* Update rollup config

* Update gh workflows

* Minor fixes

* Minor fixes

* Minor fixes

* Minor fixes

* Testing

* Minor changes

* Minor fixes

* remove `WithReact` type (#2300)

* 5.0.0-alpha.0

* [v5]: do not depend on use-sync-external-store (#2301)

* [v5]: do not depend on use-sync-external-store

* memo get(server)snapshot

* 5.0.0-alpha.1

* [v5]: refactor useMemoSelector (#2302)

* [v5]: refactor useMemoSelector

* add a test

* Revert "[v5]: refactor useMemoSelector"

This reverts commit b3c8b15586a270d12c335e566975021adf86c815.

* Revert "Revert "[v5]: refactor useMemoSelector""

This reverts commit 3c47301d23e18dffb7d72df36595f83570d15d08.

* [v5]: separate react entry point (#2303)

* 5.0.0-alpha.2

* 5.0.0-alpha.3

* refactor: Switch to Object.hasOwn (#2365)

* [v5] drop es5 (#2380)

* update yarn lock

* 5.0.0-alpha.4

* [v5]: follow React "standard" way with breaking behavioral change (#2395)

* [v5]: follow React "standard" way with breaking behavioral change

* add test

* 5.0.0-alpha.5

* [v5] Rewrite shallow to support iterables (#2427)

* [v5] fix rollup config for cjs (#2433)

* 5.0.0-alpha.6

* no production build test

* recover types that are dropped in #2462

* remove unused replacement

* [v5] Remove Devtools warning (#2466)

* chore: remove devtools extension warning

* docs: add devtools link to readme

* chore: remove unused test

* chrome: remove unused tests

* chore: remove unused test

* Revert "chore: remove unused test"

This reverts commit 0fa2a75f4936d960f703bf19e8f3505962cd628e.

* update test name

* update pnpm lock

* fix merge main

* add migration guide

* fix typos

* 5.0.0-beta.0

* update migration doc

* fix merge main

* fix merge main (prettier)

* 5.0.0-beta.1

* fix(types)!: require complete state if `setState`'s `replace` flag is set (#2580)

* fix(types): require complete state if `setState`'s `replace` flag is set

* switch to variant 2

* fix type errors

* update setState types for devtools and immer

* make devtools setState non-generic

* add migration guide

* merge migration guides

* run prettier

* Update tests/middlewareTypes.test.tsx

---------

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

* 5.0.0-beta.2

* move v5 migration doc

* fix ci

* missing commmit

* remove unused rule exclusion

* comment about react compiler

* revert eslint config

---------

Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com>
Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
Co-authored-by: Ekin Dursun <ekindursun@gmail.com>
Co-authored-by: Simon Farshid <simon.farshid@outlook.com>
2024-08-16 09:41:00 +09:00
Antoine BERNIER
24542f6664
chore: pmndrs/docs workflow (#2674)
* Create docs.yml

* home_redirect

* Update docs.yml

* Add files via upload

* Update docs.yml

* Rename bear.jpg to logo.jpg

* Add files via upload

* Update docs.yml

* Update docs.yml
2024-08-15 23:53:30 +02: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
yash chauhan
0bdf95f0c8
doc: Added zustand-interval-persist to third party (#2636)
* 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
2024-07-09 07:48:40 +09:00
alwalxed
cde0bda94b
🐛 FIX: Correct an outdated comparison between Jotai and Zustand (#2634)
Co-authored-by: systematicRealm <119763173+systematicRealm@users.noreply.github.com>
2024-07-07 21:56:02 +09:00
Yasin
b1648f7ea2
doc: added zustand-computed-state to external libraries (#2598) 2024-06-13 16:45:05 +09:00
Mayank
7c156014bc
doc: added treeshakable to external libraries (#2595)
* doc: added treeshakable to external libraries

* format with prettier
2024-06-10 20:43:30 +09:00
daishi
018358ce7e prefer npm-stat 2024-05-28 20:55:57 +09:00
Juliette Lamarche
97d112ce54
docs: add @prncss-xyz/zustand-optics to third party libraries (#2564)
* docs: add @prncss-xyz/zustand-optics to third party libraries

* fix: typo

sorry!
2024-05-21 08:00:13 +09:00
Aberratio
cae5bb48bc
Update typescript.md - middleware order (#2558)
Change in the description of the order of middleware.
2024-05-17 20:36:29 +02:00