SearchResultContext()
Home > @backstage/plugin-search-react
> SearchResultContext
Provides context-based results to a child function.
Signature:
SearchResultContext: (props: SearchResultContextProps) => JSX.Element | null
Parameters
Parameter |
Type |
Description |
---|---|---|
props |
JSX.Element | null
Example
<SearchResultContext>
{({ loading, error, value }) => (
<List>
{value?.map(({ document }) => (
<DefaultSearchResultListItem
key={document.location}
result={document}
/>
))}
</List>
)}
</SearchResultContext>