Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move the default query client to outside of the component (#437)
The current implementation of the query client within the function component leads to the creation of a new query client on each re-render. Consequently, this behavior results in the loss of data and caches associated with the query client. This PR addresses the issue by relocating the default query client outside of the function component. By doing so, we ensure that the query client persists across re-renders, maintaining data integrity and cache consistency. While it's possible to resolve this issue by directly providing the query client to the Provider on usage, this caused us some time to locate and fix the issue, hence the decision to refactor the implementation.
- Loading branch information