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

Fallback UI throws React error and does not render fallback UI #19

Closed
hsdonkin opened this issue Sep 28, 2021 · 2 comments · Fixed by #29
Closed

Fallback UI throws React error and does not render fallback UI #19

hsdonkin opened this issue Sep 28, 2021 · 2 comments · Fixed by #29

Comments

@hsdonkin
Copy link

hsdonkin commented Sep 28, 2021

As titled, Fallback UI does not render using fallbackUI prop on <ErrorBoundary /> component.

Using React 17.0.2 and Next.js 11.1.0.

The tag <fallbackUI> is unrecognized in this browser.
If you meant to render a React component, start its name with an uppercase letter.
@bondom
Copy link

bondom commented Nov 1, 2021

@hsdonkin I got the same error when I tried to pass rendered react component in fallbackUI prop, which seems to be incorrect:

<ErrorBoundary
                    level={LEVEL_ERROR}
                    fallbackUI={<MyComponent />}

Instead try to pass just name of your component, or use function:

<ErrorBoundary
                    level={LEVEL_ERROR}
                    fallbackUI={MyComponent}

or

<ErrorBoundary
                    level={LEVEL_ERROR}
                    fallbackUI={() => (<MyComponent />)}

@waltjones
Copy link
Contributor

This is now published in v0.10.0. https://github.com/rollbar/rollbar-react/releases/tag/v0.10.0

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 a pull request may close this issue.

3 participants