@solana/react-hooks 0.2.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -285,6 +285,10 @@ Wrap a subtree with `<SolanaQueryProvider>` and call hooks like `useLatestBlockh
285
285
  Suspense later? Pass `suspense` to `SolanaQueryProvider` and wrap just the section that should pause in a
286
286
  local `<Suspense>` boundary—no hook changes required:
287
287
 
288
+ The query provider ships SWR v2-aligned defaults: `revalidateOnFocus`/`revalidateOnReconnect`/`revalidateIfStale`
289
+ are `true`, `dedupingInterval` is `2000`, and `focusThrottleInterval` is `5000`. Override them per-provider via the
290
+ `query.config` prop or per-hook via the `swr` option.
291
+
288
292
  ```tsx
289
293
  import { SolanaQueryProvider, useBalance } from '@solana/react-hooks';
290
294
  import { Suspense } from 'react';
@@ -393,8 +397,16 @@ function SimulationLogs({ transaction }) {
393
397
 
394
398
  ## Going further
395
399
 
396
- - Need Wallet Standard buttons or sign/send helpers? Use `useSignIn`, `useSignMessage`,
397
- `useSignTransaction`, and friends from `walletStandardHooks.ts`.
400
+ - Wallet connection UI: `useWalletConnection` gives you the current wallet, connect/disconnect
401
+ helpers, and the connector list from `client.connectors` (or an explicit override). Pair it with
402
+ your preferred UI, or `WalletConnectionManager` for a simple modal state helper.
403
+ - Signing helpers: the wallet session returned by `useWallet` exposes `signMessage`,
404
+ `signTransaction`, and `sendTransaction` when supported by the connector. These connector methods
405
+ replace the deprecated Wallet Standard shims.
406
+ - Query hooks keep SWR options under `swr` for consistency (for example,
407
+ `useProgramAccounts(address, { swr: { revalidateOnFocus: false } })`) and expose typed parameter
408
+ and return aliases across all hooks.
409
+ - Type helpers: use `UseHookNameParameters` / `UseHookNameReturnType` for public hooks.
398
410
  - Looking for examples? See `examples/react-hooks` for a ready-to-run, tabbed playground that wires
399
411
  the provider, hooks, and mock UIs together across wallet/state, transaction, and query demos.
400
412