algolia / algolia/instantsearch

Custom callback passed to component connected with refinementsList inside component connected with currentRefinements is causing app to hang

Open
#5,249 2 comments 1 reaction 0 assignees View on GitHub
Library: React InstantSearch < 7
Dominant language
TypeScript
Stars
4.1k
Forks
553
Avg merge
1d 11h
Merged PRs (30d)
51

Description

## 🐛 Bug description

Custom callback passed to component connected with refinementsList inside component connected with currentRefinements is causing app to hang

## 🔍 Bug reproduction

Try to pass to ConnectedCompoent some callback inside CurrentRefinementsComponent for example `myFn={() => {}}` than refresh, app will hang

**Live reproduction:**

https://codesandbox.io/s/frosty-glade-74p1d?file=/src/CurrentRefinementsConnected.js

## 💭 Expected behavior

I should be able to pass my custom additional callbacks to connected component.

## Environment

- OS: macOS
- Browser: Chrome
- Version: [e.g. 6.21]

## Additional context

It happened on 6.12, and now on 6.21 it is still the same.

Contributor guide

Open the contributing guide

Research direction

Start with the live reproduction in src/CurrentRefinementsConnected.js in the linked CodeSandbox and reproduce the hang after passing a custom callback to the connected component. Trace the interaction between refinementsList and currentRefinements; done means custom callbacks can be passed without the app hanging after refresh.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.