Changelog
v0.4.0
Now it's possible to use firebase v9 modular syntax:
Before:
// initialise Firebase
import firebase from 'firebase/app'
import 'firebase/firestore'
firebase.initializeApp({
/* pass your config... */
})
// initialise PluginFirestore
import { CreatePlugin as PluginFirestore } from '@magnetarjs/plugin-firestore'
const remote = PluginFirestore({ firebaseInstance: firebase })
After:
// initialise Firebase
import { initializeApp } from 'firebase/app'
import { getFirestore } from 'firebase/firestore'
const firebaseApp = initializeApp({
/* pass your config... */
})
const db = getFirestore(firebaseApp)
// initialise PluginFirestore
import { CreatePlugin as PluginFirestore } from '@magnetarjs/plugin-firestore'
const remote = PluginFirestore({ db })
Changelog
v0.3.0
highly improved the way streams can be closed. MUCH easier to use syntax now!!
Before:
magnetar.collection('my-collection').stream()
// close stream:
const closeStream = magnetar.collection('my-collection').openStreams.get(undefined)
closeStream()
After:
magnetar.collection('my-collection').stream()
// close stream:
magnetar.collection('my-collection').closeStream()
See the new docs at: https://magnetar.cycraft.co/docs#stream-realtime-updates