So in Next.js have a cached data fetching function like this:
const fetchUser = React.cache(async () => ...);
In server components I can just get the state with
const user = await fetchUser();
but now I want to use the user object in a client component that is deeply nested.
I've tried to use stores (from zustand), but the problem is that this state is technically available at the initial render, but the store won't update until the component is mounted.
Is there a good way to do this? Tysm