TanStackT
TanStack3y ago
18 replies
awake-maroon

error saying no queryclient set

My code has a main.jsx and an app.jsx. When I try to move the queryclient initialization into main.jsx so that app.jsx can use it in a useEffect hook, i get an error saying no queryclient set.

in my app.jsx i have a ReactDOM.render call that contains the <App /> which is surrounded by <QueryClientProvider>.

how would i fix this? or does someone have an example of a main.jsx that renders an App that will have access to a QueryClientProvider
Was this page helpful?