1
ReactAdvanced#state#data
Options in order of weight: lift state to a common parent, use context for slow-changing global data, use a query cache for server state, and use a store like Zustand or Redux for large shared client state.
// server state
const { data } = useQuery({ queryKey: ['user'], queryFn: getUser });
// client state
const theme = useContext(ThemeCtx);