core-react
tweed React SDK
Last updated
tweed React SDK
Last updated
Fully compatible with React v18 and offers complete support for TypeScript
Install by package manager, install the paytweed/core-react from the npm public registry.
Ensure you have an application set up on the tweed dashboard
Use the Tweed provider as a context for your React app. Wrap your application with the Tweed provider to enable access to the Tweed hook throughout your project. Make sure to pass the Tweed provider your applicationId and the list of chains you will be using in your project.
useAuth
Manage user authentication with functions such as connect
, logout
, and retrieve access token.
useTweed
Manage your Tweed SDK integration using the useTweed
hook, which includes the setPaletteMode
function and the SDK's loading
state.
useWeb3
This hook is your gateway to the Web3 world. Use it to obtain the ethereumProvider
and begin interacting with the blockchain, such as signing transactions.