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(react): Passes the fallback function through React's createElement function #10623

Merged
merged 6 commits into from Mar 12, 2024

Conversation

MFoster
Copy link
Contributor

@MFoster MFoster commented Feb 12, 2024

This enables the fallback component used by the React Error Boundary to use hooks.

…This enables the fallback component to use hooks
@AbhiPrasad
Copy link
Member

Hey @MFoster - mind writing some tests for this? Thanks!

…s a test that was ensuring a function that returned a string would result in a null node. React considers a string to be valid and was creating an element with the string within, changes that function to return undefined instead of a string.
@MFoster
Copy link
Contributor Author

MFoster commented Mar 8, 2024

@AbhiPrasad Added a test that proves the ability to call hooks.

@AbhiPrasad
Copy link
Member

CI is failing on formatting - you can run yarn fix to address that!

@AbhiPrasad AbhiPrasad changed the title Passes the fallback function through React's createElement function. … fix(react): Passes the fallback function through React's createElement function Mar 12, 2024
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 12, 2024 13:17
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Thanks for your patience with this!

Now this is correct behavior, but I fear that it might be unexpected for some users, so I'm going to merge this into develop and release it as part of our new upcoming major version 8.0.0. #9508

@AbhiPrasad AbhiPrasad merged commit d09d184 into getsentry:develop Mar 12, 2024
45 checks passed
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.

None yet

2 participants