algolia / algolia/instantsearch
Instantsearch server-side rendering is also fetching on the client when using multi-index query in development environment
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 553
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 51
Description
### 🐛 Current behavior
A client-side request to Algolia is done, even though it was already server-side rendered
### 🔍 Steps to reproduce
1. Clone the repo https://github.com/chrisvltn/instantsearch-extra-fetch-issue
2. Run `pnpm dev` and go to your localhost `http://localhost:3000`
3. Open the browser's devtools and refresh the page.
### Live reproduction
https://github.com/chrisvltn/instantsearch-extra-fetch-issue
### 💭 Expected behavior
No request to Algolia is done client-side when entering the page
### Package version
instantsearch.js@4.74.0 algoliasearch@5.2.5 react-instantsearch@7.13.0
### Operating system
MacOS
### Browser
Firefox
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Clone the linked reproduction repository, run `pnpm dev`, open localhost:3000, and inspect browser DevTools while refreshing. Compare the development SSR and client network activity against the expected behavior: entering the page should not trigger an additional Algolia request for the multi-index query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100