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

COM-85: Refactor theming of ErrorBoundary #1451

Conversation

jamesricky
Copy link
Contributor

@jamesricky jamesricky commented Nov 28, 2023

Refactoring to a function-component is not possible, as there is no alternative to componentDidCatch,
according to the React Docs:

There is currently no way to write an error boundary as a function component.

@jamesricky jamesricky self-assigned this Nov 28, 2023
@jamesricky jamesricky force-pushed the allow-slots-to-extend-admin-components branch 2 times, most recently from 1c6694d to 515f868 Compare November 28, 2023 14:24
Base automatically changed from allow-slots-to-extend-admin-components to feature/refactor-admin-component-theming November 28, 2023 14:37
@jamesricky jamesricky force-pushed the refactor-error-boundary-theming branch 2 times, most recently from 8b8b224 to 89dda01 Compare November 29, 2023 08:44
Refactoring to a function-component is not possible, as there is no
alternative to `componentDidCatch`, according to the [React Docs](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary):

> There is currently no way to write an error boundary as a function component.
@jamesricky jamesricky force-pushed the refactor-error-boundary-theming branch from 89dda01 to ec3d9f2 Compare November 29, 2023 08:45
@jamesricky jamesricky merged commit e817030 into feature/refactor-admin-component-theming Nov 29, 2023
@jamesricky jamesricky deleted the refactor-error-boundary-theming branch November 29, 2023 09:30
jamesricky added a commit that referenced this pull request Jan 9, 2024
Refactoring to a function-component is not possible, as there is no
alternative to `componentDidCatch`,
according to the [React
Docs](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary):

> There is currently no way to write an error boundary as a function
component.
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