Skip to content

Automatically expose promises when using firestore option #245

Closed
@franciscolourenco

Description

@franciscolourenco

It would be useful to be able to use the short firestore notation and still be able to access the promises, for usage with vue-promised for instance.

There are not a lot of situation where data is loaded asynchronously, and a loader indicator is not necessary.

i.e.

<template>
  <Promised :promise="$firestore.promised.todos">
	<!-- etc... -->
  </Promised>

  <Promised :promise="$firestore.promised.currentTodo">
	<!-- etc... -->
  </Promised>
</template>


<script>
new Vue({
  data: {
    // Usually an array for collection
    todos: [],
    // and null for documents
    currentTodo: null,
  },
  firestore: {
    todos: db.collection('todos'),
    currentTodo: db.collection('todos').doc('1'),
  },
})
</script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions