I am getting the hits using the algolia react hook like so:
const { hits } = useHits(props);
Now I want to assign a type to the object that is not of type Hit but extends that type by my custom type Product.
I am trying to do this:
{hits.map(
(hit: Hit<BaseHit> & Product) =>
but it does not work and tells me that the types are incompatible. How can I change the type of hits
to an array of products: Product[]
?