Skip to content

_app. componentDidCatch is deprecated in upcoming v9.3.7 - Is the Sentry example still valid? #12562

Answered by timneutkens
Vadorequest asked this question in Help
Discussion options

You must be logged in to vote

It's actually not using that method, using componentDidCatch is fine in any component. What was deprecated is having to call super.componentDidCatch (calling the built-in _app componentDidCatch) as that does not do anything special anymore.

So in case of your example you can remove super.componentDidCatch and replace it with throw error as that makes it bubble up the error again.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Vadorequest
Comment options

@timneutkens
Comment options

@Vadorequest
Comment options

Answer selected by Vadorequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants