You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a page with the InstantSearch component that syncs with a third party router via start and dispose, then navigating away, the following error occurs: Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function..
馃攳 Steps to reproduce
Load the initial page that renders the InstantSearch component, which is synced to a third party router (react-router-dom) via start and dispose.
Navigate away by pressing a Link, and the error should appear in the console.
I would expect the dispose function to be run in time so that there is no attempt to sync the URL, which results in the state update on an unmounted component.
馃悰 Current behavior
When loading a page with the
InstantSearch
component that syncs with a third party router viastart
anddispose
, then navigating away, the following error occurs:Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
.馃攳 Steps to reproduce
InstantSearch
component, which is synced to a third party router (react-router-dom) viastart
anddispose
.Link
, and the error should appear in the console.Live reproduction
https://codesandbox.io/p/sandbox/hopeful-night-flhh3j?file=%2Fsrc%2FApp.tsx
馃挱 Expected behavior
I would expect the dispose function to be run in time so that there is no attempt to sync the URL, which results in the state update on an unmounted component.
Package version
instantsearch.js 4.60.0, react-instantsearch 7.3.0
Operating system
macOS 13.2.1
Browser
Chrome 119.0.6045.159
Code of Conduct
The text was updated successfully, but these errors were encountered: