Skip to content

How to populate from firestore within a subcollection ? #922

Open
@GautierT

Description

@GautierT

Hi,
I have a subcollection of ingredients containing data and a ref to the main ingredients collection.
image

I want to populate data on my subcollection with the data from the main ingredients collection.

I thought about doing something like this :

  useFirestoreConnect([
    {
      collection: "users_lists",
      doc: listId,
      subcollections: [
        {
          collection: "ingredients",
          populates: [{ child: "ref", root: "ingredients" }],
        },
      ],
      storeAs: "my_ingredients",
    },
  ])

but i still the firestore object in my redux store :
image

I can't find in the doc how to do that.

Thanks for the help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions