Skip to main content
@swishapp/react provides a React context provider and hooks that wrap the Swish SDK. Use it to add save buttons, wishlists, and item counts to any React or Next.js storefront.

Quick start

Wrap your app in SwishProvider and use hooks to interact with saved items.
The SDK is client-only by design. All state loads in the browser after mount to have no effect on initial render performance. SwishProvider can be rendered in SSR and RSC contexts, but the SDK does not initialize until the client.

API reference

SwishProvider

Context provider that loads the SDK and makes it available to hooks.

Hooks

useSwish, useSwishItem, useSwishItems, useSwishLists, useSwishItemCount, useSwishQuery, and useSwishIntent.

Types

The package re-exports all types from @swishapp/sdk, so you can import SDK types directly:
See the SDK reference for the full type surface.