Skip to content

Firestore hooks - run function on data update #62

@benjamin-sommer

Description

@benjamin-sommer

Is there a simple way to run a function every time a new snapshot is loaded by the client? I need to run a simple function that makes some changes to the data gotten from firestore, and then sets a useState value. Currently, you can only use the variable provided when you initialise a useCollection hook, meaning it is hard to format the data first before using the variable in JSX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions