Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@magnetarjs/plugin-firestore

cycraft1.6kTBD1.2.9TypeScript support: included

Magnetar plugin firestore

magnetar-plugin, firebase, firestore, cloud-firestore, google-cloud-firestore, vuex-easy-firestore, magnetar, magnetarjs, state-management, syncing-solution, db-sync, auto-sync, framework-agnostic, optimistic-ui, vuejs, vuex, vue-sync, vue-state, vue-db, vue-store, firestore, data-store, data-cache, cache-store, local-store, remote-store, global-store, database-sync, database-management, database

readme

hero

Magnetar 🌟

A framework-agnostic syncing solution that auto-connects any DB/API with your local data store and has optimistic-UI built in.

npm i magnetar

TLDR

TLDR overview

Documentation

magnetar.cycraft.co

Meet the family

  • Magnetar 🌟

    State-management done right with automatic sync to remote databases and services. Framework-agnostic & optimistic-UI built-in

  • Blitzar ⚡️

    Generate Vue Forms and Data-tables fast with a simple JSON-like syntax

  • Planetar 🪐

    A Vue framework for creating a design system styleguide with interactive component explorer

changelog

CHANGELOG

v0.4.0

breaking changes
plugin-firestore

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 })

v0.3.0

highly improved the way streams can be closed. MUCH easier to use syntax now!!

breaking changes
stream

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