-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
v2 #810
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. |
Size Change: -54.5 kB (-89.81%) 🏆 Total Size: 6.18 kB
ℹ️ View Unchanged
|
* [v2] breaking: do not throw promises * use use * fix CI hopefully * fix CI hopefully 2 * fix CI hopefully 3 * fix CI hopefully 4 * fix CI hopefully 5 * any type for simplicity
* [v2] breaking: do not copy initial objects * fix deepClone * refactor * ah we need it * deep clone * minor fix
* TS minimal requirement v4.5 * wip: test old ts * remove downlevel-dts * simplify test * simplify test 2 * simplify test 3 * wip: useMaybePromise * wip: useMaybePromise 2 * wip: useMaybePromise 3 * rename back
* [v2] breaking: require react 18 and drop use-sync-external-store * drop tests pre react 18 * wip: cannot use react 17 for prd test * drop production test which is impossible * esm? * fix regex * fix sed
* remove depreacated useProxy macro * revert plugin-transform * remove two more babel packages * revert babel core * remove proxyWithComputed * remove addComputed * remove devtools deprecated option
* [v2] breaking: drop UMD/SystemJS builds and simplify babel config * format
* Address spurious consistency check re-renders by using useLayoutEffect inside useSnapshot instead of useEffect * Move regression tests for useSnapshot perf improvement to optimization test file * Update tests/optimization.test.tsx --------- Co-authored-by: Daishi Kato <[email protected]>
I am curious why valtio is the best state management library supported for react19? It seems that there is no PR related to react19. |
@L-Qun do you have source for this statement? would love to know more. thanks. |
|
#866 is the one related. Valtio v1 doesn't work well with React 19 with upcoming React Compiler. It's not best state management among other libs, but I think it's unique. |
@dai-shi Thank you for your reply. Could you explain the issues between Valtio v1 and the compiler, and the reasons for the changes? There aren't many details in the PR. Looking forward to your response. |
Some links that may help:
Hmm, there must be some descriptions more with examples, but I can't find it now. Basically, if you have, first render: when |
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [valtio](https://togithub.com/pmndrs/valtio) | [`^1.13.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/valtio/1.13.2/2.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/valtio/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/valtio/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/valtio/1.13.2/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/valtio/1.13.2/2.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pmndrs/valtio (valtio)</summary> ### [`v2.0.0`](https://togithub.com/pmndrs/valtio/releases/tag/v2.0.0) [Compare Source](https://togithub.com/pmndrs/valtio/compare/v1.13.2...v2.0.0) ### 🎉🎉🎉 Valtio v2 is Here! 🍾🍾🍾 #### Small Breaking Changes Most users won't even notice the differences, but we recommend checking out the [migration guide](https://togithub.com/pmndrs/valtio/blob/main/docs/guides/migrating-to-v2.mdx) to ensure a smooth transition. #### New Emoji 💊 -> 🧙 Say hello to our new emoji! This change symbolizes the magic of Valtio. #### Let’s Grow the Ecosystem Together! We are entering a new era of Valtio development, and we need your help to grow the ecosystem. Whether you are an experienced contributor or just getting started, now is the perfect time to join us! #### What's Changed - v2 by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/valtio/pull/810](https://togithub.com/pmndrs/valtio/pull/810) - feat(core): expose internal states and functions by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/valtio/pull/931](https://togithub.com/pmndrs/valtio/pull/931) - breaking(vanilla): do not handle promises by [@​dai-shi](https://togithub.com/dai-shi) in [https://github.com/pmndrs/valtio/pull/934](https://togithub.com/pmndrs/valtio/pull/934) #### New Contributors - [@​AmirSa12](https://togithub.com/AmirSa12) made their first contribution in [https://github.com/pmndrs/valtio/pull/898](https://togithub.com/pmndrs/valtio/pull/898) - [@​TotallyBiased](https://togithub.com/TotallyBiased) made their first contribution in [https://github.com/pmndrs/valtio/pull/901](https://togithub.com/pmndrs/valtio/pull/901) - [@​L-Qun](https://togithub.com/L-Qun) made their first contribution in [https://github.com/pmndrs/valtio/pull/908](https://togithub.com/pmndrs/valtio/pull/908) - [@​himself65](https://togithub.com/himself65) made their first contribution in [https://github.com/pmndrs/valtio/pull/920](https://togithub.com/pmndrs/valtio/pull/920) - [@​kciter](https://togithub.com/kciter) made their first contribution in [https://github.com/pmndrs/valtio/pull/922](https://togithub.com/pmndrs/valtio/pull/922) **Full Changelog**: pmndrs/valtio@v1.13.2...v2.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
Related Issues or Discussions
#703
Tasks
Snapshot
type as public API [v2] export Snapshot type #856proxy()
is no longer a pure function