useHasSlice
The useHasSlice hook returns a boolean indicating whether a given Slice exists in an Index, and registers a listener so that any changes to that result will cause a re-render.
useHasSlice(
indexId: string,
sliceId: string,
indexesOrIndexesId?: IndexesOrIndexesId,
): boolean| Type | Description | |
|---|---|---|
indexId | string | |
sliceId | string | |
indexesOrIndexesId? | IndexesOrIndexesId | The |
| returns | boolean |
This hook follows the same Indexes object resolution rules as the useSliceIds hook.
Since
v9.1.0