-
-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose building blocks #2974
expose building blocks #2974
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: |
Preview in LiveCodesLatest commit: 087d9a9
See documentations for usage instructions. |
7871c0f
to
d499340
Compare
d499340
to
4a2d1ef
Compare
4a2d1ef
to
a64288b
Compare
a64288b
to
81fb3b3
Compare
81fb3b3
to
7cdb085
Compare
7cdb085
to
81ffc49
Compare
Do you have any specific use cases in your mind? |
Previously, we had the ability to build a store with a custom getAtomState, setAtomState. jotai-scope uses this when creating scoped stores. With the new implementation, I think jotai-scope will likely need access to modify addtional functions such as flushPending and invalidateDependents to provide scope-specific behavior. While its more work to build a custom store, I think its since these apis are INTERNAL anyway. |
I'm still not sure if jotai-scope needs it, but I would like to let you worry about it. So exposing them is fine. I'll tweak a little bit as I didn't like the role of storeArgs already. |
I should be able to remove dependence on |
|
Let me take care of it. |
I think this is coming full circle, but as we removed getAtomState, it's more like a level-up spiral. You may not like the flat building blocks array, but this is my strong opinion. |
/ecosystem-ci run |
Ecosystem CI Output
|
ca35233
into
pmndrs:feat/core/expose-internals-instead-of-derive
Summary
Expose buildingBlocks by passing in to buildStore.
Background: We sometimes want to use a custom function in place of a building block when creating a new store. This PR is one approach that enables this functionality.
Check List
pnpm run fix:format
for formatting code and docs