Originally posted by **sharathprabhal** June 29, 2023
I use Valtio as a store for in a project that uses both React and vanilla. I have a keyed object of items in a store. Based on user action, I set a "derived" currentObject and use a getter to select "current object" and perform operations on it. When the "current object" is updated, `useSnapshot` triggers but subscribe does not.
See repro code at https://codesandbox.io/s/valtio-subscribe-57p4st
Please let me know if this is a bug or if there is a alternate/better way to do this. Thanks!
Discussed in https://github.com/pmndrs/valtio/discussions/742