1226 Commits

Author SHA1 Message Date
Daishi Kato
4a5e814a0e
chore: update dev dependencies (#3159)
* chore: update dev dependencies

* downgrade plugin-typescript
2025-06-26 23:07:40 +09:00
Wonsuk Choi
e639587da1
docs(README): remove 'omit' in 'Overwriting state' section (#3160)
* docs(README): replace 'lodash' with 'es-toolkit' in 'Overwriting state' section

* docs(README): change 'es-tooklit/compat' to 'es-toolkit/compat/omit'

* docs(README): replace 'es-toolkit' with custom 'omit' implementation

* docs(README): remove 'omit' util function

* docs(README): simplify 'deleteTuna'
2025-06-25 11:17:14 +09:00
Wonsuk Choi
5bc717b663
refactor(middleware): replace export * with explicit named and type exports (#3151)
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-06-23 12:41:54 +09:00
Vladimir Chirikov
ca08a5ebf9
perf(devtools): avoid inferring action type when explicit action name is provided (#3147)
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-06-23 12:17:41 +09:00
Wonsuk Choi
a6143e0f23
test(shallow): update 'shallow' and 'useShallow' imports to use 'zustand/shallow' (#3157) 2025-06-19 18:44:01 +09:00
Daishi Kato
3d9ecb1a10
fix links to the demo and the docs (#3148) 2025-06-09 08:41:52 +09: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
csark0812
c3dceea0e1
Add zustand-expo-devtools to third-party middleware list (#3135)
* Add zustand-expo-devtools to third-party middleware list

Wrote a dev plugin that allows for full connection between zustand state and redux devtools!

* ordered alphabetically
2025-05-25 22:49:21 +09:00
Wonsuk Choi
a03acc3887
test(vanilla/subscribe): add test for covering fireImmediately option in 'subscribeWithSelector' (#3131) 2025-05-22 12:58:34 +09:00
daishi
01749b01c7 5.0.5 v5.0.5 2025-05-21 21:05:14 +09:00
Daishi Kato
ceb9744ac7
chore: update dev dependencies (#3128) 2025-05-21 20:47:28 +09:00
Wonsuk Choi
ad32cdf7a0
test(vanilla/basic): add test for 'getInitialState' (#3130)
* test(vanilla/basic): add test for 'getInitialState'

* Update tests/vanilla/basic.test.ts

* Update tests/vanilla/basic.test.ts

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-05-21 20:22:09 +09:00
Ali Mert Çakar
670b60e19a
feat(devtool): inferred action type (#2987)
* feat(devtools middleware) add automatic action name finding

* docs(readme) add inferActionName example

* feat: update readmes

* feat: update devtools middleware and tests

* feat: remove inferActionName

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Co-authored-by: Danilo Britto <dbritto.dev@gmail.com>
2025-05-21 20:12:14 +09:00
Wonsuk Choi
6953c29dc5
test(vanilla/shallow): add test for pure iterable with different values returns false (#3129) 2025-05-21 11:41:09 +09:00
2yunseong
5df8085b0b
refactor: remove unnessary type assertion (#3113)
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-05-21 09:52:37 +09:00
Hong-Kuan Wu
b4177b3172
feat: add devtools.cleanup() method (#3111)
* feat(devtools): add cleanup method

* docs(devtools): add cleanup section

* reduce lines

* test(devtools): test if the connection removed after cleanup

---------

Co-authored-by: daishi <daishi@axlight.com>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-05-21 09:49:59 +09:00
Danilo Britto
a56a3e4bde
feat(vanilla): update shallow compare function and tests (#3108)
* feat(vanilla): update shallow compare function and tests

* prefer Object.getPrototypeOf

* docs: update shallow docs

* feat: minor fixes

---------

Co-authored-by: daishi <daishi@axlight.com>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-05-21 09:46:37 +09:00
Wonsuk Choi
37878da019
chore(eslint): remove overrides for .js files (#3126) 2025-05-20 15:29:27 +09:00
Wonsuk Choi
9a58ca9c95
chore(eslint): update to 'eslint-plugin-react-hooks@6.0.0-rc.1', remove 'eslint-plugin-react-compiler' (#3122) 2025-05-17 14:13:12 +09:00
Danilo Britto
14feb61c7e
Update use-store-with-equality-fn.md (#3119) 2025-05-12 16:54:39 -05:00
wingedotter5
2fcfc30530
Fix typo (#3115) 2025-05-10 10:26:31 -05:00
Wonsuk Choi
028909eafa
chore(eslint): enforce file extension usage for internal modules, ignore external packages (#3116)
* chore(eslint): enforce file extension usage for internal modules, ignore external packages

* chore(*): apply the updated ESLint rules to the relevant files
2025-05-10 22:45:58 +09:00
Danilo Britto
36627acb60
Update persisting-store-data.md (#3110) 2025-05-06 14:32:23 -05:00
Josh Schneider
95bce2f74c
Fix small issue in README.md (#3106) 2025-05-03 12:58:25 -05:00
daishi
312a7076f9 5.0.4 v5.0.4 2025-05-02 08:41:08 +09:00
Daishi Kato
2a53f2ec7e
chore(deps): update dev dependencies (#3104) 2025-05-02 08:32:49 +09:00
Daishi Kato
850777bbfc
react-native condition for CJS (#3087) 2025-05-02 08:20:58 +09:00
shinhyogeun
c72ac92764
remove duplicated type declaration (#2982)
Co-authored-by: kenny-io <kenny.io@kakaoenterprise.com>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-05-02 08:15:12 +09: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
Luke
bd58db0faf
docs: fix the usage error of setPosition (#3100) 2025-04-28 23:06:03 -05:00
Viktor Persson
67673947d6
docs: Prefer const to let (auto generating selectors) (#3094) 2025-04-25 20:25:37 +09:00
Rahul Singh
4d3a0176ca
fix: handle hardware acceleration disabled scenario in demo site (#3082)
* fix: handle hardware acceleration disabled scenario in demo site

This commit improves the demo site's error handling when hardware acceleration
is disabled in the browser. The changes include:

- Improved fallback UI with a more informative message

The fallback scene now shows:
- A static image of the Zustand ogimage

This fixes the issue where the demo site would break without any feedback
when hardware acceleration is disabled.

Testing:
- fallback works when hardware acceleration is disabled

* fixed code format

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-04-16 08:36:12 +09:00
Danilo Britto
21fc1b1522
docs: update createWithEqualityFn and useStoreWithEqualityFn docs (#3084)
* Update create-with-equality-fn.md
* Update use-store-with-equality-fn.md
2025-04-15 17:10:09 -05:00
Wonsuk Choi
473cfbf5ad
ci(.github/workflows): rename 'cr' to 'preview-release' (#3069) 2025-04-15 20:12:20 +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
Wonsuk Choi
35f5cbff1f
ci(.github/workflows): rename 'compressed-size-action' to 'compressed-size' (#3070)
* ci(.github/workflows): rename 'compressed-size-action' to 'compressed-size'

* ci(.github/workflows/compressed-size.yml): rename the job name from 'compressed-size' to 'compressed_size'
2025-03-30 07:22:52 +09:00
jroitgrund
17e281fd75
docs: strict null check in createContext example (#2995)
* docs: prefer useState in createContext example

Both useState and useRef are correct in practice: useState will only render once since we never set the state after initializion, and useRef is safe to use since the component never needs to rerender when the ref value changes.

However, lint rules will flag useRef as a mistake, because we are passing a ref value to a child component, which in general can cause stale components since changing refs doesn't trigger re-renders.

* formatting

* explicit null check
2025-03-20 21:23:42 +09:00
Wonsuk Choi
6c7699cc16
docs(README.md): change build badge url (#3062) 2025-03-20 10:34:19 +09:00
Wonsuk Choi
45974540da
ci(.github/workflows): add 'test.yml' and rename job (#3059)
* ci(.github/workflows/lint-and-type.yml): add matrix strategy for parallel execution

* ci(.github/workflows/lint-and-type.yml): set 'fail-fast' to 'false'

* ci(.github/workflows): change jobs name

* ci(.github/workflows): add test.yml

* ci(.github/workflows/test.yml): add if condition

* ci(.github/workflows/test-old-typescript.yml): rename job to 'test_old_typescript'

* ci(.github/workflows/test.yml): remove matrix strategy

* ci(.github/workflows/test.yml): add comment in build script

* ci(.github/workflows/test.yml): change test script to sequentially
2025-03-19 10:52:22 +09: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
goosewobbler
3089fdc435
docs: remove zutron, add zubridge (#3047)
* docs: remove zutron, add zubridge

* docs: fix formatting
2025-03-12 21:54:00 +09:00
Shashikant Yadav
681036c319
Update introduction.md (#3045) 2025-03-12 06:28:00 -05:00
Wonsuk Choi
f85898fdbe
chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)
* chore(eslint.config.mjs): update 'eslint-plugin-react-hooks' config to use 'recommended-latest'

* chore(package.json): update 'eslint-plugin-react-hooks' to latest version

* chore(pnpm-lock.yaml): relfect 'package.json'

* chore(package.json): update 'eslint-plugin-react-compiler' to latest version

* chore(pnpm-lock.yaml): reflect 'package.json'

* chore(eslint.config.mjs): update 'eslint-plugin-react-compiler' config
2025-03-11 22:01:22 +09:00
조우혁
9ba6a63799
docs: fix typos (#3042) 2025-03-09 19:10:53 -05: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
daishi
979ce7de92 disable blank issues 2025-03-01 08:19:40 +09:00
Wonsuk Choi
a1c7f1c20f
refactor(middleware): rename argument names like 'a', 'f' (#3032)
* refactor(middleware): rename argument name 'a' to 'arg' or 'args'

* refactor(middleware): rename argument name 'f' to 'fn'

* refactor(middleware/devtools.ts): rename argument name 'arg0' to 'args'
2025-02-28 17:53:30 +09:00
Wonsuk Choi
8ced2719ac
refactor(middleware/combine.ts): change exported function to 'function declaration' (#3030) 2025-02-27 20:43:35 +09:00
Gabriel Saunders
bc60812e33
docs: added zustand-namespaces to 3rd party (#3028) 2025-02-24 17:14:19 +09:00
Marcin Kulpa
90f45eb076
Chore/enhance prettier config (#3022)
* chore: enhance prettier config

* chore: fix prettier issues

* Update package.json

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-02-20 10:28:40 +09:00