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

[EuiIcon] Fix setState errors when in React.StrictMode #5899

Merged
merged 5 commits into from
May 12, 2022

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented May 12, 2022

Summary

closes #4783

This PR is essentially a copy of @Phizzard's work in #4910. The original PR fixes the issue but unfortunately was closed before it could be merged.

QA

Repro steps

  • In src-docs/src/views/icon/icons.js, add <React.StrictMode> in place of the <> wrapper around the exported component

Before

After

Checklist

- [ ] Added or updated jest and cypress tests

  • Checked in Chrome, Safari, Edge, and Firefox
  • A changelog entry exists and is marked appropriately

@cee-chen cee-chen requested a review from thompsongl May 12, 2022 20:46
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5899/

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM; confirmed the fix with a local build and StrictMode

@cee-chen cee-chen merged commit 5579e1e into main May 12, 2022
@cee-chen cee-chen deleted the eui-icon-early-setstate branch May 12, 2022 21:56
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.

[EuiIcon] Early setState yields a console error
4 participants