-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I might be going about this wrong, but I'd like to unsubscribe from filters when the component dismounts, or after some other event, doing something like:
const {
events,
unsubscribe,
} = useNostrEvents({
filter: {
authors: [pubkey],
kinds: [0],
since: 0
},
})
useEffect(() => {
return () => {
unsubscribe()
}
}, [])
Doing this, I get an error stating unsubscribe is not a function
even though the type of unsubscribe is () => void
. What is the proper way to unsubscribe from a filter?
Really nice work btw... It's been fun playing around with it. :-)
Metadata
Metadata
Assignees
Labels
No labels