Skip to main content

Hypothesis

The Cloud Firestore client-side SDK provides an unparalleled interface, in terms of elegance, for dealing with "real-time" data in the client-side code. Combining the positive traits of the Cloud Firestore client-side SDK with TanStack Query could hypothetically solve the most prominent problem I face when developing with TanStack Query.

The most prominent problem I face when developing with TanStack Query is that if I opt-out of revalidation, then I have to write huge amounts of boilerplate-heavy fragile query cache updating code which is tightly coupled with both the data model and the UI of the app. I identify that there's a missing piece here — a need for a solution which can take care of the query cache updating in a generic and robust way. My hypothesis is that the recipe for that solution can be derived from the Cloud Firestore client-side SDK.