Skip to main content
Version: Next

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

SearchResultContextProps

see SearchResultContextProps.

**Returns:**

JSX.Element | null

Example

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