Skip to content

feat(store2): add dev4_get_mounted_atoms#2594

Merged
dai-shi merged 4 commits intomainfrom
feat/add-dev4_get_mounted_atoms
Jun 3, 2024
Merged

feat(store2): add dev4_get_mounted_atoms#2594
dai-shi merged 4 commits intomainfrom
feat/add-dev4_get_mounted_atoms

Conversation

@arjunvegda
Copy link
Collaborator

Summary

  • Adds dev4_get_mounted_atoms to return Iterable list of mounted atoms

Check List

  • pnpm run prettier for formatting code and docs

@vercel
Copy link

vercel bot commented Jun 2, 2024

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 Jun 3, 2024 1:12pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 2, 2024

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.

@github-actions
Copy link

github-actions bot commented Jun 2, 2024

Size Change: +141 B (+0.15%)

Total Size: 92.1 kB

Filename Size Change
dist/experimental.js 4.76 kB +47 B (+1%)
dist/system/experimental.development.js 3.87 kB +47 B (+1.23%)
dist/system/experimental.production.js 2.04 kB +1 B (+0.05%)
dist/umd/experimental.development.js 4.85 kB +46 B (+0.96%)
ℹ️ View Unchanged
Filename Size
dist/babel/plugin-debug-label.js 927 B
dist/babel/plugin-react-refresh.js 1.14 kB
dist/babel/preset.js 1.4 kB
dist/index.js 242 B
dist/react.js 1.06 kB
dist/react/utils.js 1.39 kB
dist/system/babel/plugin-debug-label.development.js 1.1 kB
dist/system/babel/plugin-debug-label.production.js 771 B
dist/system/babel/plugin-react-refresh.development.js 1.29 kB
dist/system/babel/plugin-react-refresh.production.js 929 B
dist/system/babel/preset.development.js 1.58 kB
dist/system/babel/preset.production.js 1.14 kB
dist/system/index.development.js 253 B
dist/system/index.production.js 182 B
dist/system/react.development.js 1.18 kB
dist/system/react.production.js 711 B
dist/system/react/utils.development.js 860 B
dist/system/react/utils.production.js 461 B
dist/system/utils.development.js 258 B
dist/system/utils.production.js 188 B
dist/system/vanilla.development.js 4.33 kB
dist/system/vanilla.production.js 2.19 kB
dist/system/vanilla/utils.development.js 5.15 kB
dist/system/vanilla/utils.production.js 3.11 kB
dist/umd/babel/plugin-debug-label.development.js 1.08 kB
dist/umd/babel/plugin-debug-label.production.js 855 B
dist/umd/babel/plugin-react-refresh.development.js 1.28 kB
dist/umd/babel/plugin-react-refresh.production.js 1.01 kB
dist/umd/babel/preset.development.js 1.54 kB
dist/umd/babel/preset.production.js 1.22 kB
dist/umd/experimental.production.js 2.69 kB
dist/umd/index.development.js 381 B
dist/umd/index.production.js 329 B
dist/umd/react.development.js 1.18 kB
dist/umd/react.production.js 785 B
dist/umd/react/utils.development.js 1.53 kB
dist/umd/react/utils.production.js 1.01 kB
dist/umd/utils.development.js 398 B
dist/umd/utils.production.js 343 B
dist/umd/vanilla.development.js 5.18 kB
dist/umd/vanilla.production.js 2.79 kB
dist/umd/vanilla/utils.development.js 6.07 kB
dist/umd/vanilla/utils.production.js 3.74 kB
dist/utils.js 246 B
dist/vanilla.js 5.09 kB
dist/vanilla/utils.js 5.93 kB

compressed-size-action

@github-actions
Copy link

github-actions bot commented Jun 2, 2024

LiveCodes Preview in LiveCodes

Latest commit: 05a9abb
Last updated: Jun 3, 2024 1:11pm (UTC)

Playground Link
React demo https://livecodes.io?x=id/6KDNM2UJ2

See documentations for usage instructions.

// for debugging purpose only
type DevStoreRev4 = {
dev4_get_internal_weak_map: () => WeakMap<AnyAtom, AtomState>
dev4_get_mounted_atoms: () => IterableIterator<AnyAtom>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to return the Set, given that our contract is it's read-only.

Suggested change
dev4_get_mounted_atoms: () => IterableIterator<AnyAtom>
dev4_get_mounted_atoms: () => Set<AnyAtom>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Updated it in this commit

@arjunvegda arjunvegda marked this pull request as ready for review June 3, 2024 12:04
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working on this.

@dai-shi dai-shi added this to the v2.8.3 milestone Jun 3, 2024
@dai-shi dai-shi changed the title feat: add dev4_get_mounted_atoms feat(store2): add dev4_get_mounted_atoms Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants