Skip to content

Commit 599b639

Browse files
subirjollySubir Jolly
andauthored
fix: fix error boundary issue where View not rerendering (#3194)
Co-authored-by: Subir Jolly <subirjolly@Subirs-MacBook-Pro.local>
1 parent d81b069 commit 599b639

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/shared/components/ErrorBoundary.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
3838
})
3939
}
4040

41+
public shouldComponentUpdate() {
42+
if (this.state.error) {
43+
this.setState(() => {
44+
return {error: null}
45+
})
46+
}
47+
48+
return true
49+
}
50+
4151
public render() {
4252
const {error} = this.state
4353

0 commit comments

Comments
 (0)