Overview
Para’s React hooks provide an intuitive way to manage wallet state, handle transactions, and interact with the Para SDK. This guide assumes you’ve already set up the Para Modal in your application following one of our framework integration guides.Setting Up the Provider
To use Para’s React hooks, wrap your application withParaProvider
. This provider gives your components access to
Para’s hooks and state management.
Provider Configuration
Using the Hooks
Here’s an example component using Para’s React hooks to handle wallet connection and message signing:Available Hooks
Query Hooks
Hooks to access current the current Para instance account and wallet state. These hooks use the React QueryuseQuery
hook and return the
same structure as the React Query hooks.
Mutation Hooks
Hooks for performing actions and state changes in the Para instance. These hooks use the React QueryuseMutation
hook and
return the same structure as the React Query hooks (see the note below). NOTE Our hooks return mutation functions
named specifically for their mutation action. For example,useCreateUser
returns both createUserAsync
and
createUser
rather than the mutateAsync
and mutate
functions that React Query returns, these functions are
identical to their React Query counterparts.
Utility Hooks
Hooks for retrieving and modifying application state. These hooks DO NOT incorporate or follow and React Query patterns.Advanced Usage
Using Para with EVM Providers
TheParaProvider
can work with our External Wallet Connectors to provide wallet connection. An example using our Para
EVM Provider is shown below: