React Installation
The Mina SDK provides first-class React support with hooks and a context provider for seamless integration into your React applications.Installation
Install the SDK along with its peer dependencies.Requirements
Import Path
React-specific exports are available from a dedicated subpath:The
/react subpath includes client-side only code. Always import React hooks from @siphoyawe/mina-sdk/react, not from the main entry point.Framework Setup
- Next.js App Router
- Next.js Pages Router
- Vite / Create React App
The SDK requires client-side rendering. Mark your provider component with Then use in your root layout:
'use client':app/providers.tsx
app/layout.tsx
TypeScript Configuration
Ensure yourtsconfig.json supports the SDK:
tsconfig.json
Verifying Setup
Create a simple component to verify the SDK is working:components/SDKStatus.tsx
Available Exports
The/react subpath exports:
Additionally, commonly used types are re-exported for convenience:
Next Steps
MinaProvider
Configure and set up the provider
useMina Hook
Access the SDK instance
