Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.Summary
This hook provides access to EVM and Solana RPC providers.Check out our guide on Using RPC Providers
Usage
This hook must be fed with an RPC provider selector, of which you can chose among two:evmProvidersSelector, exported from@dynamic-labs/ethereum-coresolanaProvidersSelector, exported from@dynamic-labs/solana-core
Return Value
This hook’s return value depends on the selector with which it was fed:- EvmRpcProviderMethods when fed with
evmProvidersSelector - SolanaRpcProviderMethods when fed with
solanaProvidersSelector