This PR refactors the callback (useCallback) returned from useFacetCallback
Previously, the callback had the facets (originally passed to useFacetCallback) in its dependency array, meaning it would return a new instance of the callback when the facets were modified
This PR removes the facets from the dependency array and instead puts them in a ref.
The callback then reads from the ref to get the current facet values
useCallback
) returned fromuseFacetCallback
useFacetCallback
) in its dependency array, meaning it would return a new instance of the callback when the facets were modified