Skip to main content

SearchResultApi()

Home > @backstage/plugin-search-react > SearchResultApi

Request results through the search api and provide them to a child function.

Signature:

SearchResultApi: (props: SearchResultApiProps) => JSX.Element | null

Parameters

Parameter

Type

Description

props

SearchResultApiProps

see SearchResultApiProps.

**Returns:**

JSX.Element | null

Example

<SearchResultApi>
{({ loading, error, value }) => (
<List>
{value?.map(({ document }) => (
<DefaultSearchResultListItem
key={document.location}
result={document}
/>
))}
</List>
)}
</SearchResultApi>