Skip to content

Dynamic relayUrls

Latest
Compare
Choose a tag to compare
@t4t5 t4t5 released this 25 Mar 21:07

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! 👍