Backend Query - Query once in Component and reuse result in component instance

Database & APIs

Is there a way to query in a component & pass the query result or use the query in the front end i.e., where we use the component?

  • In the screenshot , i want to query the subscriptions collection where stripe_customer_id (users collection) == stripe_customer_id (subscribers collection)

  • Once i have this result i want to update the buttontext in the front end (where the component is used) with the querie's results. Is this possible ?

  • Or

  • i have to setup a query for each instance of the component independently ? which will lead to a query being executed for each instance of component?

What have you tried so far?

setting up query for each instance of the component i.e., if there are 6 instances of the component then there are 6 queries which will run 6 times i.e., once for each component

Did you check FlutterFlow's Documentation for this topic?
No
2 replies