Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 27cec1f

Browse files
committed
unsubscribe from subscription
1 parent ad87e86 commit 27cec1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/template/components/code-state.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export default class CodeState extends React.Component {
6969
this.getKernelInfo();
7070
}
7171

72+
componentWillUnmount() {
73+
this.subscription.unsubscribe();
74+
}
75+
7276
render() {
7377
return React.Children.map(this.props.children, child => {
7478
return React.cloneElement(child, {

0 commit comments

Comments
 (0)