Install
You have to installvaltio and jotai-valtio to use this feature.
atomWithProxy
atomWithProxy creates a new atom with valtio proxy.
It’s two-way binding and you can change the value from both ends.
Parameters
valtio/useSnapshot. This will result in more renders, but have more guarantees that it syncs with other Jotai atoms.
mutableAtom
mutableAtom wraps a value in a self-aware Valtio proxy. You can make changes to it in the same way you would to a normal js-object.
Count value is stored under the value property.
Parameters
proxyFn for custom proxy functions. Can be proxy (default) or a custom function.