Skip to content

Fix for React Maximum update depth exceeded errror on search result pages #141

Open
distoai[bot] wants to merge 2 commits intomainfrom
disto-fix-20230714-191003-589
Open

Fix for React Maximum update depth exceeded errror on search result pages #141
distoai[bot] wants to merge 2 commits intomainfrom
disto-fix-20230714-191003-589

Conversation

@distoai
Copy link
Copy Markdown

@distoai distoai Bot commented Jul 14, 2023

Root Cause:

The React Maximum update depth exceeded error is occurring on the search result pages.

Steps to fix:

The error is caused by an infinite loop in the useCalculatedNavLinkVariant function. To fix the issue, we need to modify the useCalculatedNavLinkVariant function to prevent the infinite loop.
The error is also caused by a missing dependency in the useCalculatedNavLinkVariant function. To fix the issue, we need to add the authenticatedUser dependency to the dependency array of the useLayoutEffect hook.

DistoBot added 2 commits July 14, 2023 19:10
…riant function. To fix the issue, we need to modify the useCalculatedNavLinkVariant function to prevent the infinite loop.
…NavLinkVariant function. To fix the issue, we need to add the authenticatedUser dependency to the dependency array of the useLayoutEffect hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants