[fix] react component runaways, error boundaries (#1625)
This PR fixes a few components that were updating too often. It changes the format of our error boundaries in order to avoid re-rendering them as changed props. ### Change Type - [x] `major` — Breaking change
This commit is contained in:
parent
5cb08711c1
commit
83184aaf43
11 changed files with 55 additions and 67 deletions
|
@ -31,11 +31,7 @@ export const InnerIndicator = ({ editor, id }: { editor: Editor; id: TLShapeId }
|
|||
if (!shape.shape) return null
|
||||
return (
|
||||
<OptionalErrorBoundary
|
||||
fallback={
|
||||
ShapeIndicatorErrorFallback
|
||||
? (error) => <ShapeIndicatorErrorFallback error={error} />
|
||||
: null
|
||||
}
|
||||
fallback={ShapeIndicatorErrorFallback}
|
||||
onError={(error) =>
|
||||
editor.annotateError(error, { origin: 'react.shapeIndicator', willCrashApp: false })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue