react-instantsearch icon indicating copy to clipboard operation
react-instantsearch copied to clipboard

`connectStateResults.searchResults` should be of nullable type

Open tk-olari opened this issue 3 years ago • 1 comments

🐛 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.

tk-olari avatar Feb 09 '22 15:02 tk-olari

The types are maintained on DefinitelyTyped. You are correct and feel free to make a pull request there though!

Haroenv avatar Feb 09 '22 16:02 Haroenv