algolia / algolia/instantsearch

`connectStateResults.searchResults` should be of nullable type

Open
#5,247 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.