4 ms·
It's not about passing props - the "thenable" detection comes into play if you throw a promise (or something shaped like a promise) from within `render()`.
by acemarke 9y ago
It's not about passing props - the "thenable" detection comes into play if you throw a promise (or something shaped like a promise) from within `render()`.
- wereHamster 9y agoWait, can render functions now throw, legally?
- timdorr 9y agoYup. This builds on error boundaries and componentDidCatch: https://reactjs.org/blog/2017/07/26/error-handling-in-react-16.html https://reactjs.org/blog/2017/07/26/error-handling-in-react-...
- danabramov 9y agoYes. (For this use case.)