algolia / algolia/instantsearch
react-instantsearch doesn't support algolia v5
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 553
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 51
Description
### 🐛 Current behavior
I upgraded JavaScript API Client to version 5.13.0 successfully, but it is not compatible with `InstantSearch` component from react-instantsearch anymore.
This is the code:
```
import { searchClient as algoliaSearch } from "@algolia/client-search";
import { Configure, InstantSearch } from "react-instantsearch";
...
{children}
```
The error is type related saying `is not assignable to type 'SearchClient'`
Is `react-instantsearch` going to be updated soon to support algolia v5?
### 🔍 Steps to reproduce
1. Install latest algolia
2. Install latest react-instantsearch
3. Try to use it
### Live reproduction
https://www.algolia.com/doc/libraries/javascript/v5/upgrade
### 💭 Expected behavior
`InstantSearch` component shouldn't give any errors.
### Package version
algoliasearch 5.13.0, react-instantsearch 7.13.7
### Operating system
Mac OS 15.0.1
### Browser
Chrome
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start by reproducing the type error with algoliasearch 5.13.0 and react-instantsearch 7.13.7, then inspect the InstantSearch component's SearchClient type and the client returned by @algolia/client-search. Done means the shown searchClient is accepted by InstantSearch and the existing reproduction type-checks without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100