Closed dmaskasky closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
jotai | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 30, 2024 2:02pm |
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.
Latest commit: cb641c86cf233541d59740085a40d0b7fd59d550
Last updated: Jul 30, 2024 2:02pm (UTC)
Playground | Link |
---|---|
React demo | https://livecodes.io?x=id/DTWHNYL4W |
See documentations for usage instructions.
I don't think this complexity and the trick should be added in this util.
Please consider patching atomFamily
in jotai-scope
.
If we were to go this road, I think I'd prefer adding .has(atom)
method. But it feels too specific to jotai-scope
.
Related Bug Reports or Discussions
idea1: https://github.com/pmndrs/jotai/pull/2678 idea2: https://github.com/pmndrs/jotai/pull/2679
Fixes # https://github.com/jotaijs/jotai-scope/issues/50
Summary
jotai-scope is trying to support scoping atomFamily.
This PR demonstrates one approach in which the atomFamily supports use of instanceof language feature.
The following pseudo code represents logic that would live in jotai-scope.
Check List
pnpm run prettier
for formatting code and docs