Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(deps): fix "too much recursion" error with circular deps #2899

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

francoischalifour
Copy link
Member

Since React InstantSearch 6, there's an issue with props equality with circular dependencies because of the dep fast-deep-equal that was introduced.

Errors like "too much recursion" appeared in browsers (mostly Firefox). More and more users face this issue, and I also faced this issue in some apps I built.

I tried upgrading the fast-deep-equal dependency to ^3.1.0 which supposedly fixes this, but the build seems broken since I get an error about no default exports exist in this package.

I tried react-fast-compare and although it's a bit bigger, it fixes the issue. I tried in the Next app that the user sent.

@francoischalifour francoischalifour requested a review from a team March 5, 2020 15:06
@ghost ghost requested review from eunjae-lee and yannickcr and removed request for a team March 5, 2020 15:06
@francoischalifour francoischalifour force-pushed the fix/deps-compare-circular branch from 1d73bb4 to 3f48ef6 Compare March 5, 2020 15:09
@algobot
Copy link
Contributor

algobot commented Mar 5, 2020

Deploy preview for react-instantsearch ready!

Built with commit 3f48ef6

https://deploy-preview-2899--react-instantsearch.netlify.com

@algolia algolia deleted a comment from algobot Mar 5, 2020
@francoischalifour francoischalifour merged commit c5f27a1 into master Mar 6, 2020
@francoischalifour francoischalifour deleted the fix/deps-compare-circular branch March 6, 2020 10:11
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@@ -15864,6 +15864,11 @@ react-fast-compare@^2.0.2:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==

react-fast-compare@^3.0.0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how come nothing is removed from the lockfile? Does another package already use it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Storybook.

@such
Copy link

such commented Mar 17, 2020

Could this be released?

Haroenv added a commit that referenced this pull request Mar 18, 2020
# [6.4.0](v6.3.0...v6.4.0) (2020-03-18)

### Bug Fixes

* **deps:** fix "too much recursion" error with circular deps ([#2899](#2899)) ([c5f27a1](c5f27a1))
@Haroenv
Copy link
Contributor

Haroenv commented Mar 18, 2020

Thanks for the ping, 6.4.0 is released :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants