Skip to content

Latest commit

 

History

History
79 lines (47 loc) · 3.66 KB

CHANGELOG.md

File metadata and controls

79 lines (47 loc) · 3.66 KB

Nostr-Hooks

2.10.0

  • Added a loadMore function to the useSubscribe hook to fetch more events.
  • Added a hasMore boolean to the useSubscribe hook to check if there are more events to fetch.

2.9.9

  • Fixed a typo from loginWithExtention to loginWithExtension.

Breaking Changes

  • Fixed a typo from loginWithExtention to loginWithExtension. Now you need to use loginWithExtension instead of loginWithExtention.

2.9.8

  • Added support for custom NDK instances. Now you can pass a custom NDK instance to all the hooks, but you need to execute ndk.connect() manually once you create a custom NDK instance.

2.9.2

  • Replaces useProfiles with useProfile hook.
  • Added useAutoLogin hook.
  • Bug fixes for useLogin hook.
  • Bug fixes for setting ndk signer.
  • Refactor store.

Breaking Changes

  • Replaces useProfiles with useProfile hook. Now you can use useProfile hook to fetch a single profile by address.
  • Replaces reLoginFromLocalStorage with loginFromLocalStorage.

2.8.0

  • Improved useSubscribe hook to react to the changes in the input parameters.

Breaking Changes

  • useSubscribe hook is now sensitive to all the input parameters. If any of the input parameters change, the hook will unsubscribe from the previous subscription and subscribe to the new one. This will help you to subscribe to different filters based on the input parameters. You need to make sure that the input parameters are memoized and don't change on every render to avoid infinite re-render loops. You can find examples in README.
  • useNostrHooks hook is now sensitive to the initial NDK instance parameter. You need to make sure that the initial NDK instance is memoized and doesn't change on every render to avoid infinite re-render loops. You can find examples in README.

2.7.0

  • Improved interacting with different signers.
  • Added useSigner hook.
  • Added useLogin hook.
  • Removed useNip07 hook.

Breaking Changes

  • Extracted signer related functionalities from useNDK hook to useSigner hook. Now you need to import setSigner method from useSigner hook instead of useNDK hook.
  • Removed useNip07 hook. Now you can use useLogin hook to login with extension (NIP-07).

2.6.0

  • Added fetchProfiles boolean to useSubscribe hook to fetch profiles on subscription.

2.5.0

Breaking Changes

  • It reverts replacing Zustand store with the React Context API. Now, you don't need to wrap your application with the NostrHooksContextProvider component. but you need to initialize NostrHooks with useNostrHooks hook. You can find more information about this change in readme.
  • It reverts using Immer for updating NDK instance in useNDK hook, and uses CloneDeep from lodash to update the NDK instance.

2.4.0

Breaking Changes

  • Using Immer for updating NDK instance in useNDK hook. This will require you to update your code to use the new produce function from immer to update the NDK instance. This is a breaking change because the old setState function is no longer available. You can find more information about this change in the README, and Immer documentation.

2.x.x

Breaking Changes

  • It replaces the Zustand store with the React Context API. This means that now you need to wrap your application with the NostrHooksContextProvider component.

  • It replaces nostr-tools with nostr-dev-kit (NDK). This means that most of the functionalities like caching, batching, and merging filters are now handled by NDK and Nostr-Hooks is only responsible for managing the component state and subscriptions.