diff --git a/README.md b/README.md index 6296347..dc5c3fa 100644 --- a/README.md +++ b/README.md @@ -113,11 +113,11 @@ class ChildComponent extends React.Component { }; componentDidMount() { - this.context.loop.subscribe(this.update); + this.loopID = this.context.loop.subscribe(this.update); } componentWillUnmount() { - this.context.loop.unsubscribe(this.update); + this.context.loop.unsubscribe(this.loopID); } update() {