Replies: 1 comment
-
I admire the work of Zustand and Valtio. In fact, at the time I made Teaful open-source I didn't know them. I personally don't like the comparison between library X and Z. Surely, depending on the project, one or the other may be more interesting. Teaful is still in version 0.x and it is necessary to evolve it with sense and I am open to listening to suggestions and proposals for version 1.0. The goals of Teaful are to be a tiny library (-1kb), easy to use (similar to useState in React), and powerful (only rerendering the components that use the part of the store they consume). The proxy is used as an intermediary between the state (in JSON) and the component consumption. const [price, setPrice] = useStore.cart.price()
console.log(typeof price) // number
console.log(typeof setPrice) // function It does not return a proxy. It uses a proxy to subscribe to the JSON state portion ( It is a different approach. The approach is more immutability to make it closer to the useState, and not mutating the state through a proxy like Valtio. |
Beta Was this translation helpful? Give feedback.
-
i've asked the same question at their repo - pmndrs/zustand#655 :)
Beta Was this translation helpful? Give feedback.
All reactions