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

feat(react): expose FallbackRender as top-level type #5307

Merged
merged 2 commits into from Jun 24, 2022
Merged

feat(react): expose FallbackRender as top-level type #5307

merged 2 commits into from Jun 24, 2022

Conversation

MasterOdin
Copy link
Contributor

@MasterOdin MasterOdin commented Jun 23, 2022

This PR exposes the FallbackRender type at the root level of @sentry/react package. Currently, to use the type and so get type info on the passed error object., a project I work on does:

import { FallbackRender } from '@sentry/react/types/errorboundary.d';
// v6: import { FallbackRender } from '@sentry/react/dist/errorboundary';

export const ErrorOverlay: FallbackRender = (error) => { /* component code */ });

which feels wrong, as reaching into the package internals is clearly asking for unannounced breaking changes (as seen going from v6->v7).


Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Signed-off-by: Matthew Peveler <matt@popsql.com>
Co-authored-by: Abhijeet Prasad <devabhiprasad@gmail.com>
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.

Thank you for your contribution. This should be out with a release that goes out next week!

@AbhiPrasad AbhiPrasad merged commit 3abfb2d into getsentry:master Jun 24, 2022
@MasterOdin MasterOdin deleted the patch-1 branch June 24, 2022 18:22
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