algolia / algolia/instantsearch
Nextjs DynamicWidgets + Configure double requests.
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 553
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 51
Description
### 🐛 Current behavior
Hi, when we try to implement in a NextJS app PLP page that has dynamic widgets for facets filtering, we hit an issue where it fires 2 requests to Algolia.
Our original target is to have virtual facets and use dynamic widgets for displaying only facets that are requared for the specific page and ordering.
This is a big issue that will affect our quota.
### 🔍 Steps to reproduce
1 Go to sandbox and check the terminal when load the page.
2 You will observe that they are 2 requests fired.
### Live reproduction
https://codesandbox.io/p/devbox/github/secretsales-pkostadinov/Algolia-issue-demo?file=%2Fapp%2FSearch.tsx
### 💭 Expected behavior
We are expecting to make only one call to algolia.
### Package version
"algoliasearch": "5.1.1", "algoliasearch-helper": "3.27.1", "instantsearch-ui-components": "0.18.0", "instantsearch.css": "8.11.0", "next": "16.0.7", "react": "19.0.0", "react-dom": "19.0.0", "react-instantsearch": "7.24.0", "react-instantsearch-core": "7.24.0", "react-instantsearch-nextjs": "1.0.15"
### Operating system
_No response_
### Browser
_No response_
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start with /app/Search.tsx in the linked CodeSandbox and inspect the network or terminal output while loading the PLP with DynamicWidgets and Configure. Reproduce the two requests, trace the cause of the duplicate, and verify completion when loading the page makes only one request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100