From 2931983ef9d7374adfbbd815f5316e362f8beda9 Mon Sep 17 00:00:00 2001 From: Lars Hanisch Date: Tue, 12 Nov 2024 16:07:40 +0100 Subject: [PATCH] Correct example in README.md - subscribe doesn't return anything --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5cc5ffe..b993285 100644 --- a/README.md +++ b/README.md @@ -130,8 +130,8 @@ const googTrades = streamStock('GOOG'); const nflxTrades = streamStock('NFLX'); const googController = new AbortController(); -const googSubscription = googTrades.subscribe({next: updateView}, {signal: googController.signal}); -const nflxSubscription = nflxTrades.subscribe({next: updateView, ...}); +googTrades.subscribe({next: updateView}, {signal: googController.signal}); +nflxTrades.subscribe({next: updateView, ...}); // And the stream can disconnect later, which // automatically sends the unsubscription message