"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');
});
I'd like to work on this issue if you don't mind.
I won't promise we won't fix it sooner — but if you can find the cause, it would be appreciated
I found a fix but thanks for the offer.
@gaearon just curious did you find the cause?
Yes I fixed it
Most helpful comment
I found a fix but thanks for the offer.