Skip to content
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

feat: add back dev4_restore_atoms to store v2 #2509

Merged
merged 10 commits into from May 21, 2024
Merged

Conversation

arjunvegda
Copy link
Collaborator

Summary

  • Add back dev4_restore_atoms method to store v2
  • Remove internal types for store1 (I no longer need them for v1, just v2 suffices😅)

Copy link

vercel bot commented Apr 14, 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 May 21, 2024 0:40am

Copy link

codesandbox-ci bot commented Apr 14, 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.

Copy link

github-actions bot commented Apr 14, 2024

Size Change: +347 B (+0.38%)

Total Size: 91.4 kB

Filename Size Change
dist/experimental.js 4.68 kB +130 B (+2.86%)
dist/system/experimental.development.js 3.81 kB +89 B (+2.39%)
dist/system/experimental.production.js 2.03 kB +1 B (+0.05%)
dist/umd/experimental.development.js 4.77 kB +127 B (+2.73%)
ℹ️ 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.4 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.31 kB
dist/system/vanilla.production.js 2.17 kB
dist/system/vanilla/utils.development.js 5.08 kB
dist/system/vanilla/utils.production.js 3.07 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.67 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.54 kB
dist/umd/react/utils.production.js 1.02 kB
dist/umd/utils.development.js 398 B
dist/umd/utils.production.js 343 B
dist/umd/vanilla.development.js 5.16 kB
dist/umd/vanilla.production.js 2.77 kB
dist/umd/vanilla/utils.development.js 5.98 kB
dist/umd/vanilla/utils.production.js 3.7 kB
dist/utils.js 246 B
dist/vanilla.js 5.07 kB
dist/vanilla/utils.js 5.85 kB

compressed-size-action

Copy link

github-actions bot commented Apr 14, 2024

LiveCodes Preview in LiveCodes

Latest commit: b95fd04
Last updated: May 21, 2024 12:39pm (UTC)

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

See documentations for usage instructions.

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.

A side note: I wonder what would be the difference between "restore" and multiple "set"s.

src/vanilla/store2.ts Outdated Show resolved Hide resolved
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
src/vanilla/store2.ts Outdated Show resolved Hide resolved
@dai-shi
Copy link
Member

dai-shi commented May 21, 2024

A side note: I wonder what would be the difference between "restore" and multiple "set"s.

Yes, there's a difference. store.set can't update atom with customized write (like write-only atom and atomWithReducer).

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.

It looks great! Thanks for investigating it. Nice work.

@dai-shi dai-shi added this to the v2.8.1 milestone May 21, 2024
@dai-shi dai-shi merged commit a685dfc into main May 21, 2024
37 checks passed
@dai-shi dai-shi deleted the feat/add-dev_restore-to-v2 branch May 21, 2024 13:52
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.

None yet

2 participants