question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Original error message is swallowed in an edge case with render phase updates

See original GitHub issue

“Cannot set property ‘memoizedState’ of null”

screen shot 2019-01-23 at 5 09 40 pm
  // 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, Jan 23, 2019

I found a fix but thanks for the offer.

1reaction
joshuaaguilar20commented, Jan 23, 2019

@gaearon just curious did you find the cause?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found