Skip to content

@magnetarjs/plugin-firestore@0.1.0

Choose a tag to compare

@magnetarjs/plugin-firestore: 0.1.0

breaking change:

You need to pass Firebase instance now, as opposed to the Firestore instance.

Eg.

// ---------------------------------------------
// 0. Make sure firebase is instantialized BEFORE magnetar
// ---------------------------------------------
import firebase from 'firebase/app'
import 'firebase/firestore'

firebase.initializeApp({
  // ...
})

// ---------------------------------------------
// 1. the plugin firestore for remote data store
// ---------------------------------------------
import { CreatePlugin as PluginFirestore } from '@magnetarjs/plugin-firestore'
import firebase from 'firebase/app'

// create the remote store plugin instance:
const remote = PluginFirestore({ firebase })