Releases: t4t5/nostr-react
Releases · t4t5/nostr-react
Dynamic relayUrls
nostr-react
will now dynamically connect and disconnect to relays if they are updated in the NostrProvider
:
const CustomProvider = observer(({ children }) => {
const { userStore } = useStores();
return (
<NostrProvider relayUrls={userStore.relays} debug={true}>
{children}
</NostrProvider>
);
return <>{children}</>;
});
Thx to @aussedatlo for getting this feature working! 👍
Export Metadata from useProfile
Improve useProfile hook
Add "eose" event
New "useProfile" hook
This release adds a new useProfile
hook to subscribe to metadata changes to user profiles! A nice thing with this hook is that it automatically batches requests if you're trying to load multiple profiles at once. This way, you don't have to worry about sending too many requests at once from your client to a relayer. 🎉
Update code examples in README
Stable connections and subscriptions
This fixes various bugs with duplicated connections and subscriptions, typically related to React's strict mode
Upgrade nostr-tools to latest version
This fixes some type errors.