Skip to content

Subscribing to query from custom hook #7402

Answered by TkDodo
mo-lon asked this question in General
Discussion options

You must be logged in to vote

if you don't pass from and to to ComponentB, you are not observing the same cache entry in both components. You need access to from and to in components that want to read data from that cache entry.

I could lift the state

This is the way. You need to make the client state accessible where you want to read server state that depends on it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mo-lon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants