React query does this very well.
Right now using the EventClient at the top of an application works just fine, but on a page level or in deeply nested components the only way to pass an instantiated client down would be through prop drilling (ew).
What we can do is create a context provider that takes the query client as a prop and exposes useful hooks such as useClient.
React query does this very well.
Right now using the
EventClientat the top of an application works just fine, but on a page level or in deeply nested components the only way to pass an instantiated client down would be through prop drilling (ew).What we can do is create a context provider that takes the query client as a prop and exposes useful hooks such as
useClient.