Open paul-pro opened 4 years ago
Facing same issue, any updates on this?
The error boundary class needs:
static getDerivedStateFromError(error) {
return { hasError: true };
}
I still had a very rough time, but that's one of the issues around evalCode.
@jpdriver please include a fix for this issue in v3.
Hi! Looks like when you use undefined JS object or its method, error will be normally caught: e.g.
code= {'some.method'}
will correctly render error withReferenceError: some is not defined
But when you try to reference some undefined method of real object it will cause internal error which will break whole page. See reproduction on code sandbox: https://codesandbox.io/s/react-live-bug-mqbu7 (btw,
code={'window'}
will also blow up page)I found this bug while live editing input code in mdx environment.