pmndrs / valtio

🧙 Valtio makes proxy-state simple for React and Vanilla
https://valtio.dev
MIT License
8.84k stars 248 forks source link

synchronous partial state update Interface #700

Closed Juyeong-Byeon closed 1 year ago

Juyeong-Byeon commented 1 year ago

Summary

just like described below link there is no synchronous partial state update Interface in valtio https://github.com/pmndrs/valtio/discussions/699

So there is some limits. for achieve the goal to use batched updates for some parts of the state while still having the ability to perform synchronous updates for other parts.

Link to reproduction

https://codesandbox.io/s/valtio-sandbox-forked-ij76sz?file=/src/App.js

Check List

Please include a minimal reproduction.

dai-shi commented 1 year ago

Let's re-open when we have some ideas in #699.