This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Allow useCollection
to only run when certain conditons are met
#1150
Labels
type: enhancement
The issue is a request for an enhancement.
When working on Attribute Filters there were some cases where we needed to wait for certain data to become available (from the REST API) before passing that data to another REST API request. Queries are performed using
useCollection
hooks. Hooks cannot be executed or ran conditionally.To get around this, @nerrad suggested added a callback (or boolean?) to the
useCollection
hook which would return true/false to as whether or not to run the query yet. In this case, we'd check if the dependency value existed before running the query.The text was updated successfully, but these errors were encountered: