Skip to content

Releases: t4t5/nostr-react

Dynamic relayUrls

25 Mar 21:07
Compare
Choose a tag to compare

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

31 Jan 18:16
Compare
Choose a tag to compare
  • Export Metadata from useProfile 01f2c3c
  • New events should be isLoading by default 78eb302

v0.6.3...v0.6.4

Improve useProfile hook

29 Jan 19:56
Compare
Choose a tag to compare
  • Add missing metadata fields to user type 53e9e30
  • Add onDone + enabled params to useProfile 9c7f628

v0.6.2...v0.6.3

Add "eose" event

29 Jan 19:09
Compare
Choose a tag to compare
  • add onDone to the useNostrEvents hook (#11) 410490b
  • Update isLoading state based on "eose" event 76a8461

v0.6.1...v0.6.2

New "useProfile" hook

02 Jan 10:50
Compare
Choose a tag to compare

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. 🎉

  • Add new useProfile hook c606193
  • Add onSubscribe callback f572ae9
  • Make sure filter arg isn't cached 50f67a0

v0.5.1...v0.6.0

Update code examples in README

27 Dec 22:29
Compare
Choose a tag to compare

v0.5.0...v0.5.1

Stable connections and subscriptions

27 Dec 20:38
Compare
Choose a tag to compare

This fixes various bugs with duplicated connections and subscriptions, typically related to React's strict mode

  • Add relay URLs to debug logs 30b1687
  • Handle strict mode in provider b4bab84
  • Better automatic unsubscription 5ccaf96
  • Working unsubscribe function 1f5db62
  • Use base64 to detect filter changes 54e611e

v0.4.1...v0.5.0

Upgrade nostr-tools to latest version

25 Dec 20:17
Compare
Choose a tag to compare

Add "unsubscribe" method

25 Dec 17:58
Compare
Choose a tag to compare

v0.3.0...v0.4.0

Add onEvent method to useNostrEvents

25 Dec 16:30
Compare
Choose a tag to compare