glad you liked it and pls feel free to share your thoughts.

Reply to this note

Please Login to reply.

Discussion

I’m working on a project right now, and `useSubscribe()` has been a godsend. I am having trouble filtering by event id though. Any chance you have an example I could see? I tried digging into the source, but I can’t see what I’m doing wrong.

you don't have to filter the events by yourself. just use a separate useSubscribe hook for each filter that you want.

use one hook for kind 0 for example and another for kind 3

the library will do the rest for you.

Hm, I see your point, but what if I want to fetch a particular note? I still need to collect all the notes then select the one I want on my side?

aha, just attach that particular event id to 'ids' property like filters: {ids:['']} it's the basic of nostr explained in NIP01

Gotcha, thanks. I guess it means something broke with my dynamic routing then.