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.- EVM
- Solana
- Cosmos
For adding a custom EVM networks with Wagmi see: WAGMI - adding custom networks
EvmNetwork
to the DynamicContextProvider’s overrides.evmNetworks settings.This can be done in two different ways:-
By passing an array of
EvmNetwork, it completely overrides whatever networks were received from your dashboard configurations and uses that array instead. -
By passing a method with signature
(dashboardNetworks: EvmNetwork[]) => EvmNetwork[], you can use this callback to first receive the array of networks that was sent from your dashboard configurations, and then return the array of networks you want the app to use.
The second approach is best for making adjustments to the networks you get from our dashboard (like changing rpc urls),
as well as when you want to hide some specific networks.If you’re just trying to merge new networks with the ones from dashboard, we have a helper function that will make that easier:
Note that the order of the params for mergeNetworks matters: the first param takes precedence in case of a conflict.