Original error message is swallowed in an edge case with render phase updates
See original GitHub issue“Cannot set property ‘memoizedState’ of null”

// Regression test
fit('does not swallow original error when updating another component in render phase', () => {
let {useState} = React;
let _setState;
function A() {
const [, setState] = useState(0);
_setState = setState;
return null;
}
function B() {
_setState(() => {
throw new Error('Hello')
});
}
expect(() =>
ReactTestRenderer.create(
<React.Fragment>
<A />
<B />
</React.Fragment>,
),
).toThrow('Hello');
});
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error messages swallowed in certain edge cases · Issue #8430
It blocks proper rendering of the view, yet no trace of it is show in the developer console. The expected behaviour would be...
Read more >Error Boundaries and Render Props - YouTube
Article (and code ) available here: https://www.leighhalliday.com/ error -boundaries-and- render -propsHow to implement and test an error ...
Read more >Changelog - Apache Tomcat 8 (8.5.66)
Make the non-blocking I/O error handling more robust by handling the case where the application code swallows an IOException in WriteListener.
Read more >CNA SAMPLE TEST.pdf - Professional Healthcare Development
One of the major reasons the elderly person is incontinent of urine is: a. they are too lazy to go to the bathroom...
Read more >changelog - GitHub Pages
changelog. version 500. crashes: I messed the mpv update up in v499. my golden rule is never to put out bleeding-edge library updates,...
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 Free
Top 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
I found a fix but thanks for the offer.
@gaearon just curious did you find the cause?