react-instantsearch
react-instantsearch copied to clipboard
`connectStateResults.searchResults` should be of nullable type
🐛 Bug description
Currently searchResults
is of type SearchResults<BasicDoc>
but on component initialization using connectStateResults
HOC, the value is null
until Algolia's first response. So in reality it's a nullable prop and should be of type SearchResults<BasicDoc> | null
.
The types are maintained on DefinitelyTyped. You are correct and feel free to make a pull request there though!