Bug in example : with-componentdidcatch
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Hi,
I tried this example : with-componentdidcatch
Basically, it’s using componentDidCatch
in the new _app.js
. It intercepts the errors and does a console.log
when it intercepts one :
Expected Behavior
- I see
CUSTOM ERROR HANDLING
in the server logs
Current Behavior
- I don’t see
CUSTOM ERROR HANDLING
in the logs- it’s not in server logs
- it’s not in client logs
Steps to Reproduce (for bugs)
npx create-next-app --example with-componentdidcatch with-componentdidcatch-app
cd with-componentdidcatch-app
yarn dev
Context
The bigger picture here is trying to use error boundaries with next.js.
Your Environment
Tech | Version |
---|---|
next | 6.0.0 |
node | 9.8.0 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Error Boundaries - React
A class component becomes an error boundary if it defines either (or both) of the lifecycle methods static getDerivedStateFromError() or componentDidCatch() ...
Read more >Bug-proofing our application with Error Boundaries and the ...
The concept of Error Boundaries can be a great help in achieving that. It is a component that uses the componentDidCatch lifecycle method,...
Read more >Catching Errors in React with Error Boundaries
componentDidCatch(error, errorInfo). This method is called whenever an error occurs. You can log the error (and any extra information) to your ...
Read more >React error handling with react-error-boundary - LogRocket Blog
A componentDidCatch lifecycle method for performing operations when our error boundaries catch an error, such as logging to an error logging ...
Read more >what's the difference between getDerivedStateFromError and ...
the doc has this sentence: Use static getDerivedStateFromError() to render a fallback UI after an error has been thrown. Use componentDidCatch() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is this line doing?
@timneutkens @lucleray any news on this issue?