From 8f29d5f2a59578c19f0bcc08902875ecb59bcb12 Mon Sep 17 00:00:00 2001 From: Arron Washington Date: Thu, 15 Feb 2018 17:19:25 -0500 Subject: [PATCH] Update README.md to reflect actual Loop API Loop.unsubscribe(id) accepts an integer (an index, specifically) returned by Loop.subscribe(fn), not a function reference. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() {