-
Notifications
You must be signed in to change notification settings - Fork 989
Open
Description
[REQUIRED] Describe your environment
- Operating System version: Windows 11
- Browser version: EDGE 107.0.1418.42
- Firebase SDK version: 9.14.0
- Firebase Product: Firestore
[REQUIRED] Describe the problem
When hydrating (angular universal, next.js, ...) / resuming (qwik) the frontend, frameworks serialize the state of the application as a json object in the html. It works well for document & collection reference as we can use the path as a serializable reference, but not for Query. This leads to a flickering on the application if the page display data coming from a query.
Solution
Provide a way to serialize a query so it can be referenced in the backend & frontend the same way.
I saw in the code that there is a stringifyQuery that transforms a query into a string. If exposed, it would fix this issue. For example:
const ref = collection('collectionName');
const queryRef = query(ref, where('field', '==', value));
const key = stringifyQuery(queryRef);dtinth, the0rem and ishowta