-
Notifications
You must be signed in to change notification settings - Fork 990
Closed
Description
Operating System
macOS
Browser Version
Safari 16.5.2
Firebase SDK Version
10.5.0
Firebase SDK Product:
Firestore
Describe your project's tooling
index.html with source tag. Just javascript.
Describe the problem
The documentation regarding loading data bundles in the client is outdated. The code doesn't work, probably because it refers to the firebase v8 SDK.
Steps and code to reproduce issue
Here's an up-to-date version
const resp = await fetch('./bundle.txt');//assuming the bundle is in the same folder
await loadBundle(db, resp.body);
const query = await namedQuery(db, 'latest-stories-query');
const querySnapshot = await getDocs(query);
querySnapshot.forEach(doc => console.log(doc.id, " => ", doc.data()));
There is also no equivalent to the line const storiesSnap = await query.get({ source: 'cache' });, how would this be adapted to v9?