algolia / algolia/instantsearch

Instantsearch server-side rendering is also fetching on the client when using multi-index query in development environment

Open
#6,348 2 comments 0 reactions 0 assignees View on GitHub
triage
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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.