I just dropped another NDK video on how to use fetchEvent() and subscribe() and when to use one or the other.

As always, questions and comments are welcome! ๐Ÿค™

https://youtu.be/dYnS2G8_-fg

#grownostr #buildnostr #video #ndk #nostr

Reply to this note

Please Login to reply.

Discussion

I literally just saw this pop up on YouTube and canโ€™t wait to watch.

Cool! I just put a question in nostrichat about subscribe ๐Ÿ˜Š

๐Ÿ™ˆ Iโ€™m terrible about keeping an eye on nostrichat.

Hahaha! Don't worry! I'll watch the video soon ๐Ÿ˜…

Love the video. Potentially stupid questionโ€ฆ If I set closeOnEose to false, is there a recommended way to manually close the subscription? #NDK

You can simply call the stop() method on the subscription.

https://github.com/nostr-dev-kit/ndk/blob/master/src/subscription/index.ts