Closed marcinkieruzel closed 7 months ago
In some cases I want to have the up to date context event if it's not rendered in current component.
I don't think it's an issue with react-tracked. It's how useState
(useReducer
) works. I mean, it will behave the same with bare context.
What you want is probably a "global state" and in such cases, you may want to try zustand
(with or without react-tracked), or jotai
, or valtio
.
Closing as stale.
Hi, I've recently experienced an issue with React Track. Perhaps its more about understanding the library and proxies than a real problem but – In some cases I want to have the up to date context event if it's not rendered in current component. For example in useEffect hook or events. Hence an onClick event in PersonFamilyName. It will always give me an "old" value of firstName. How can I get up to date context in this circumstances?