Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent infinite rerenders in useIncomingWebhooks #6176

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

nunogois
Copy link
Member

@nunogois nunogois commented Feb 8, 2024

React can sometimes be non-intuitive and behave erratically due to the way it detects changes in hook dependencies.

This prevents infinite re-renders from useIncomingWebhooks by using a static DEFAULT_DATA constant, so that its reference is always the same, so no changes are detected when there are none.

Unrelated scouting, but this PR also removes an unneeded dependency in the memoized columns in ProjectActionsTable.

Copy link

vercel bot commented Feb 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview Feb 8, 2024 7:04pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Feb 8, 2024 7:04pm

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

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

LG!

@nunogois nunogois merged commit 13df715 into main Feb 9, 2024
15 checks passed
@nunogois nunogois deleted the fix-prevent-infinite-rerenders-useincomingwebhooks branch February 9, 2024 08:17
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.

2 participants