-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
storeHooks minor improvement #2970
storeHooks minor improvement #2970
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
|
Playground | Link |
---|---|
React demo | https://livecodes.io?x=id/7RE32AJP8 |
See documentations for usage instructions.
496112b
to
d1487e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
7aaf1a9
into
pmndrs:feat/core/expose-internals-instead-of-derive
* wip: expose internal functions * rename * tests following the change * separate internals entrypoint * fix entries * fix for umd, still wip * revert them * revert changes * rename readme * internals entry point * impl * fix store test * derive test * effect test * fix rollup config * hack types * fix workflow files * fix workflow files again * hack types again * fix rollup config * ts ignore * tried this? * test: rename * follow the change * I think this is unnecessary * fix AtomState type * do not enumerate secret methods * even better * refactor * another refactor * wip: building-block functions * give up scope tests for now * some more refactors * fix workflow file * use symbol instead of weakmap for cancelable promise * fix typo * expose util and tentative functions * does this fix? * catch error from f hook * only keeps one error * do we want to support falsy errors? * going back the circle * store hook for atoms util * does this help? * for ts3.9 * store hooks tweaks (#2969) * lazy assign store hooks internally * initializeStoreHooks * make it work with node 18 * refactor(internals): isolated mounted map in store (#2967) * refactor(internals): isolated mounted map in store * give up derive test * rev4 compatibility * a silly mistake * storeHooks minor improvement (#2970) * storeHooks: return delete function from add * Update src/vanilla/internals.ts --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com> * refactor(internals): store state in store args (#2972) * refactor(internals): atomStateMap in storeState * store args for everything and create building blocks * createStoreArgs * refactor * refactor and type * export internal types * simplify types * prefer readonly modifier * expose building blocks * elminate store args * expose building blocks (#2974) * expose building blocks * elminate store args * move top-level functions to createBuildingBlocks and add some organization * tweak createBuildingBlocks * update store and tests invocation of INTERNAL_createBuildingBlocks * fix lint and decomposition * refactor(internals): simplify building blocks --------- Co-authored-by: daishi <daishi@axlight.com> * comments * customizable building blocks * ts hack * ts hack 2 * minor change * nice to remove ! * refactor * full building blocks (#2977) * return a complete building blocks array * return mutable building blocks * revert to default function argument style --------- Co-authored-by: daishi <daishi@axlight.com> --------- Co-authored-by: David Maskasky <dmaskasky@gmail.com>
Summary
Return delete function from add in storeHooks.
Check List
pnpm run fix:format
for formatting code and docs