795 Commits

Author SHA1 Message Date
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
Danilo Britto
b8850550cb
Update how to reset state doc (#1495)
* Update how to reset state doc

* Minor fixes

* Minor changes

* Minor changes

* Minor changes

* Minor changes
2022-12-27 10:55:13 +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
0736a1c8bb 4.1.5 v4.1.5 2022-12-05 22:11:02 +09:00
Daishi Kato
60b7458179
chore(deps): update dev dependencies (#1467)
* chore(deps): update dev dependencies

* patch for older ts
2022-12-05 22:07:41 +09:00
reaper
e3d738f385
Fix: Programmatic module.exports addition for named and default exports in CJS (#1460)
* experimental export patch

patches the base index file to export the default as classic
node cjs module

* refactor

* add semi

Co-authored-by: daishi <daishi@axlight.com>
2022-12-05 21:28:51 +09:00
Nurbol
d53f92d827
ref: replace hardcoded types with StoreApi type (#1459)
Add binding of createStoreImpl methods types to StoreApi without hardcoding.
Makes it easier to read and reason about where the type comes from and belongs to.
Removing arrow function types reduces number of arrows, and makes it easier to read.
2022-12-05 21:28:40 +09:00
Anton
ed526d074b
feat(shallow): Add support of Maps and Sets to shallow comparator (#1451)
* Add support of Maps and Sets to shallow comparator.

* Update src/shallow.ts

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

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2022-12-05 21:28:28 +09:00
M. Skrzypek
f548963992
fix: do not use optional catch binding syntax (#1431) 2022-12-05 21:28:14 +09:00
Daishi Kato
7f79df4b04
Update 3rd-party-libraries.md (#1465) 2022-12-05 12:12:27 +09:00
hicucu
47b2b64e52
fix(docs): Fix 'State' declaration position (#1438)
* Fix 'State' declaration position

* Update auto-generating-selectors.md

Update pr with review

* Update auto-generating-selectors.md
2022-12-05 12:02:52 +09:00
Eugene Chybisov
bf9d0922fe
fix(docs): fix to -> do typo (#1453) 2022-11-30 08:06:36 +09:00
Ron Jones
2b29d73684
addAFish should ref 'fishes', not 'fish' (#1428) 2022-11-15 09:32:30 +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
Joel Mathew Koshy
975185011e
bumped zustand to latest version (4.1.4) in auto gen selectors doc (#1412) 2022-11-06 07:43:26 +09:00
Joel Mathew Koshy
a1d228767f
Docs: added section in slices-pattern explaining how to affect multiple stores in one function (#1404)
* added section in slices-pattern.md explaining how to have a function change multiple stores together

* change in title and subtext for better understanding
2022-11-05 16:57:19 +09:00
Daishi Kato
8329bbfa5f
chore: add issue template (#1411) 2022-11-05 13:02:34 +09:00
Devansh Jethmalani
ea8415b98d
docs(typescript): highlight the extra parenthesis for create (#1410)
* docs(typescript): highlight the extra parenthesis for `create`

* fix typo
2022-11-05 12:58:21 +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
daishi
c2248fd56a 4.1.4 v4.1.4 2022-10-31 21:48:38 +09:00
Daishi Kato
b81adbb6a3
chore(deps): update dev dependencies (#1402) 2022-10-31 21:48:14 +09:00
Daishi Kato
20ee6e9633
fix(build): no import.meta for "module" condition (#1393)
* fix(build): no import.meta for "module" condition

* be consistent with others
2022-10-31 21:39:57 +09:00
Daishi Kato
296bb4bc96
fix(build): use *.d.mts for esm ('import' condition only) (#1387)
* d.mts for esm

* copy instead of rename

* limit for relative paths
2022-10-31 21:39:35 +09:00
guenyoo
ee8666f008
Update recipes.mdx: Using subscribe with selector (#1388)
Examples used from README and are now copy/pasteable without throwing errors in sandbox
2022-10-27 23:36:03 +09:00
daishi
d6f01e7aa4 4.1.3 v4.1.3 2022-10-23 10:25:26 +09:00
Daishi Kato
d81881d40d
chore(deps): update dev dependencies (#1379)
* update dev dependencies

* fix rollup config

* fix interop option

* fix interop option again

* remove output.exports

* remove interop

* remove output.exports from umd too
2022-10-23 10:21:12 +09:00
Devansh Jethmalani
ca059788d3
fix(types): fix StateCreator subtyping (#1373)
* fix(types): fix `StateCreator` subtyping

* prefer import type

Co-authored-by: daishi <daishi@axlight.com>
2022-10-23 08:55:31 +09:00
Devansh Jethmalani
b36f29af30
fix(types): assume getState and setState will always exist on the store (#1371)
* fix(types): assume `getState` and `setState` will always exist on the store

* run prettier

* make fallback in `Get` required
2022-10-23 07:42:55 +09:00
Devansh Jethmalani
d27ea94884
Update slices pattern links in readme and flux guide (#1353)
* readme: link slices pattern guide

* docs: update slices pattern link in flux guide
2022-10-14 21:22:39 +09:00
Srinivasan Mohan
cf0bef6d5e
spelling correction (#1357) 2022-10-12 20:51:33 +09:00
J7N
84d1dfa30d
docs: Remove redundant words. (#1352)
docs: Remove redundant words.
2022-10-09 23:05:44 +09:00
daishi
509175c0b8 4.1.2 v4.1.2 2022-10-09 14:38:36 +09:00
Daishi Kato
a576b3c968
chore(deps): update dev dependencies (#1351)
* chore(deps): update dev dependencies

* tweak a workflow file
2022-10-09 14:36:32 +09:00
Devansh Jethmalani
93b5a43e82
Rewrite TakeTwo, SkipTwo and Mutate to make them work for older ts versions too (#1348)
* create tsc v4.3.5 snapshot

* rewrite `TakeTwo` and `SkipTwo`
...to work with both pre 4.3.5 and post 4.3.5 subtyping rules.

The type `Test` in the following snippet resolves to `"yes"` for
<=4.3.5 but `"no"` for >4.3.5
```ts
type Test = [string, number?] extends [unknown] ? "yes" : "no"
```
(note 4.3.5 is bisected via typescript playground which skips
some versions so it might not be super accurate, but it's
accurate enough)

* fix lint

* fix pretest script to use tsc script instead of tsc bin

* revert tests

* add a workflow to test with old tsc

* fix typo

* oops, we need to run tsc

* test against build

* fix regex 🤦‍♂️

* oops, something was missing

* build in advance

* wip: more older versions

* wip: downgrade jest types

* minimum ts version 4.1.5

* minor fix

* make `Mutate` more complete
...wrt to the domain `StoreMutatorIdentifier[]` to help the type-checker

* fix lint

Co-authored-by: daishi <daishi@axlight.com>
2022-10-09 10:15:06 +09:00
huangcheng
ae4cc7f1b1
fix: should use Object.is to compare two value (#1314) 2022-10-09 10:10:37 +09:00
Xuanbo Cheng
43ea18e768
fix(context): store property missing from useStoreApi (#1258) 2022-10-09 10:10:16 +09:00
Joel Mathew Koshy
276af10d88
docs: add instruction on how to install zustand package using yarn (#1330) 2022-10-09 10:08:50 +09:00
kpue
a848f708b7
Update comparison.md (#1346) 2022-10-07 01:10:34 +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
Joel Mathew Koshy
e8b05d8179
docs: added separate docs file for slices pattern (#1344) 2022-10-07 01:05:07 +09:00
Chris K
94dec53d9a
docs: fix image spacing. fix phrasing and various grammar issues (#1333) 2022-10-02 07:27:31 +09:00
François KY
d60f0cca7a
docs: expose enabled devtools options in the documentation (#1326) 2022-10-01 18:12:24 +09:00
Diemas
3e311520d5
fix: type replace Jotai with Recoil (#1325) 2022-09-30 14:41:15 +09:00
huangcheng
5ca63d1d63
test: rename persistent (#1315) 2022-09-27 18:15:25 +09:00
Daishi Kato
f0ff30f7c4
chore(examples): move to demo subdir and eliminate rewired (#1305)
* chore(examples): move to demo subdir and eliminate rewired

* fix some paths

* run prettier

* use v4
2022-09-22 18:34:36 +09:00
mugi-uno
77d14b17bc
docs: testing for using typescript (#1303) 2022-09-21 22:11:10 +09:00
Chris K
b739cfdb1e
docs: remove dead link from readme (#1302) 2022-09-20 22:52:44 +09:00
Danilo Britto
981fe92349
fix(docs): comparison (#1284)
* Adding improvements to comparison docs

* Rewording

* Update docs/getting-started/comparison.md

Co-authored-by: Bjorn Stromberg <bjorn@bjornstar.com>

* Update comparison.md

Co-authored-by: Bjorn Stromberg <bjorn@bjornstar.com>
2022-09-20 10:58:03 +09:00