Errors thrown in `render()` swallowed
See original GitHub issueSince Promise.resolve().then(...)
is used for deferring to another tick, any errors thrown inside render () { ... }
gets silently thrown away. At least in Safari TP 15, I think that some other browsers reports unhandled rejections.
This is very unintuitive when developing since there is no way to see what went wrong.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Render errors swallowed with React 15 · Issue #1581 - GitHub
With the solution proposed the error will indeed be thrown on React 15. But React 16+ user will have the error thrown two...
Read more >ember render hbs swallowing thrown error - Stack Overflow
I prepared a twiddle to illustrate the case; but surprisingly it works in twiddle. However; when I created a brand new ember application;...
Read more >How to prevent promises swallowing errors ? - GeeksforGeeks
In this article, we will try to understand how we may prevent the promises swallowing errors using several predefined techniques provided by ...
Read more >Error Boundaries - React
Use static getDerivedStateFromError() to render a fallback UI after an error has been thrown. Use componentDidCatch() to log error information.
Read more >Are JavaScript Promises swallowing your errors?
JavaScript Promises swallow your errors by default, causing untold pain while debugging. Learn how to keep yourself sane by handling errors ...
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
@robertknight Yes, absolutely we can re-open. FWIW I think we should probably switch (back) to
setTimeout
for debouncing since it fixes this and is smaller.If it continues to be a bad user experience for devs, preact could do:
…at the end of its promise chains.