algolia / algolia/instantsearch
`connectStateResults.searchResults` should be of nullable type
Open
Library: React InstantSearch < 7
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 554
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 51
Description
## 🐛 Bug description
Currently `searchResults` is of type `SearchResults` 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 | null`.
Contributor guide
Research direction
Start at the TypeScript definition and entry point for the connectStateResults HOC, then inspect how searchResults is initialized before Algolia's first response. Confirm the current prop type and initialization behavior, and verify that the declared type matches the observed null value using the relevant existing type checks or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100