107 Commits

Author SHA1 Message Date
Steven Wexler
c61999bacd
docs: fix getBoth return type (#3167) 2025-07-02 19:54:08 -05:00
clonemycode
9d58820318
chore: fix some typos in comment (#3139)
Signed-off-by: clonemycode <clonecode@aliyun.com>
2025-06-03 10:05:54 +09:00
wingedotter5
2fcfc30530
Fix typo (#3115) 2025-05-10 10:26:31 -05:00
Danilo Britto
48985a4cc2
docs: general docs improvements (#3102)
* feat: general docs improvements

* Update docs/guides/testing.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-29 11:15:42 -05:00
Viktor Persson
67673947d6
docs: Prefer const to let (auto generating selectors) (#3094) 2025-04-25 20:25:37 +09:00
Emmanuel Oduntan
534451ce25
docs: update tutorial (#3080)
replaced setSquares with onPlay in the handleClick function of the Board component
2025-04-11 16:23:46 -05:00
Mathilda Grace
90f8d592d4
Update Next.js guide to have explicitly nullable useRef type argument (#3053)
* Update nextjs.md with nullable `storeRef`

* Update other example in nextjs.md

* Apply suggestions from code review

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-03-15 08:19:59 +09:00
Koo Sangmo
a90981afb5
docs: update vitest config to match vitest docs (#3037)
* Update testing.md

in vite,
mergeConfig accepts only config in object form. If you have a config in callback form, you should call it before passing into mergeConfig.

You can use the defineConfig helper to merge a config in callback form with another config:

https://vite.dev/guide/api-javascript.html#mergeconfig

* Fix formatting

---------

Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
2025-03-03 07:46:37 -05:00
Mohit Tokas
57608bbbdf
Update nextjs.md (#2998)
* Update nextjs.md

add mandatory argument for useRef

* Update testing.md

added initialValue for useRef
2025-02-08 20:49:57 +09:00
이선재
65402b01d6
docs: Remove unnecessary void operator (#2994) 2025-02-04 19:37:36 +09:00
Danilo Britto
ef0c619fac
chore(docs): update tutorial tic tac toe (#2969)
* chore(docs): update tutorial tic tac toe

* chore(docs): update tutorial tic tac toe

* chore(docs): minor changes
2025-01-21 11:06:48 -05:00
SAMIR HEMBROM
37e1e3f193
docs(tutorial-tic-tac-toe.md): fix code to prevent infinite loops (#2963) 2025-01-16 22:45:58 +09:00
Mordechai Dror
d2ac8205ec
feat(types): Make ExtractState public (#2935)
* make ExtractState public and move it to vanilla

* add docs on the matter

* Update vanilla.ts

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-01-07 22:57:18 +09:00
Alexander Mordvinov
9281ec1990
fix hydrateRoot args order (#2869) 2024-11-26 16:45:35 -05: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
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
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
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
Tibinko
c0cd364b8f
docs: typo in typescript docs (#2708) 2024-08-28 09:44:04 +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
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
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
StyleShit
11cc9c3c5e
docs: fix typos in the typescript guide (#2550) 2024-05-13 10:47:11 +02:00
Chan
9d24d11e1e
Fix type in nextjs.md (#2530)
There are two typos in the error message argument.
`useCounterStore must be use` => `useCounterStore must be used`
2024-05-03 22:11:32 +09:00
Henpai Hsu
b66ccd5243
docs: update ramda example (#2510) 2024-04-26 17:07:15 +09:00
Danilo Britto
e8a5256548
Update guides (#2474)
* Update guides

* Minor fixes

* Minor changes

* Update testing.md

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

* Update testing.md

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

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
2024-04-16 10:56:39 +09:00
Dawid
fc2f85afff
Update third-party-libraries.md (#2435)
* 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>
2024-03-27 08:54:37 +09:00
Elie Schoppik
08fd864417
Fixing typo in nextjs.md (#2416)
intialize -> initialize
2024-03-16 08:21:54 +09:00
Michael Di Prisco
1392c51fae
docs: adding note about middlewares and slices (#2378)
* docs: adding note about middlewares and slices

* chore: updating slices note

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

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
2024-03-02 06:39:16 +09:00
Carsten Dietzel
827d5aacaf
Fix typo in prevent-rerenders-with-use-shallow.md (#2364) 2024-02-29 00:08:07 +09:00
Mohamed Yahye El Joud
08d13764ba
Update ssr-and-hydration.md (#2353)
* Update ssr-and-hydration.md

Small typo

* Update docs/guides/ssr-and-hydration.md

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

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Co-authored-by: Blazej Sewera <code@sewera.dev>
2024-02-22 18:14:16 +09:00
Danilo Britto
8c1a1f0327
Update nextjs guide (#2328)
* Update nextjs guide

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes
2024-02-16 11:58:13 +09:00
Charles Kornoelje
eb8443faa3
docs(middleware): modify both set and setState (#2306)
* docs(middleware): modify `set` and `setState`

* update middleware docs
2024-02-15 22:21:29 +09:00
Danilo Britto
b466a7585e
Update nextjs.md (#2324) 2024-02-10 09:14:38 +09:00
Alexander Densley
02ddd70d5b
fix broken link caused by typo (#2321) 2024-02-09 09:53:19 +09:00
Danilo Britto
f64a111b85
Update docs related to SSR/Hydration and SSR Apps (#2298)
* Update deprecation comments

* Update testing guide

* WIP

* Minor fixes

* WIP

* Update docs/guides/ssr-and-hygration.md

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

* Update docs/guides/ssr-and-hygration.md

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

* WIP

* Minor changes

* Minor changes

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update nextjs.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update ssr-and-hygration.md

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

* Update docs/guides/nextjs.md

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

* Update docs/guides/ssr-and-hygration.md

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

* Update docs/guides/nextjs.md

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

* Minor fixes

* Update docs/guides/nextjs.md

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

* Update docs/guides/nextjs.md

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

* Update docs/guides/ssr-and-hydration.md

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

* Update docs/guides/ssr-and-hydration.md

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

* Update docs/guides/ssr-and-hydration.md

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

* Update docs/guides/ssr-and-hydration.md

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

* Update docs/guides/nextjs.md

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

* Update docs/guides/nextjs.md

Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com>

* Update docs/guides/ssr-and-hydration.md

Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com>

* Update ssr-and-hydration.md

* Update docs/guides/ssr-and-hydration.md

Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com>

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com>
2024-02-08 18:13:36 +09:00
Cody Partington
4be1e9eb4a
fix(docs): errors and types fix for URL state example (#2218)
* Update connect-to-state-with-url-hash.md

Resolved a few errors and type errors in the persist and create state with URL example:

1. createJsonStorage not being called in storageOptions resulting in a type error.
2. Correct hook not being exported
3. Moved the creation of initial state inline to get the correct types passed from create/persist.
4. Used state type as generic for persist.

* yarn prettier run

* Update docs/guides/connect-to-state-with-url-hash.md

Better name for state in setter

Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>

* prettier run

---------

Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2023-12-31 22:29:34 +09:00
Andrew Hulterstrom
a4578fa5c4
docs: minor typo fix in flux-inspired-practice.md (#2252) 2023-12-15 09:08:06 +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
Rustam
c500f70cbb
fix(docs): add missing param in mocked create (Vitest guide) (#2166) 2023-11-01 23:25:51 +09:00
sobies93
13439986a8
Add missing parameter in mocking zustand testing guide (#2142)
It seems that the parameter was missing here, resulting in returning createUncurried instead of createUncurried(stateCreator)
2023-10-24 19:31:42 +09:00
Bram Van der Sype
643bb7ab11
Improve types in Immer middleware docs (#2139)
* Having the generic type on `immer` makes you lose introspection in IDE's.

* Add note about parenthesis and link back to typescript guide.
2023-10-23 08:44:10 +09:00
plrs9816
83b86a716c
fix(docs): support currying for testing mock (#2137)
* fix(docs): support currying for testing mock

* change function name

* fix lint error

* empty commit to trigger checks
2023-10-23 08:05:43 +09:00
Danilo Britto
602e1e9ebe
Update reset state docs (#2119)
* Update how-to-reset-state.md

* Minor changes

* Update how-to-reset-state.md

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

* Update how-to-reset-state.md

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

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
2023-10-15 08:34:07 +09:00