Skip to main content

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 utility function merges two arrays of GenericNetwork objects, with the first array taking precedence in case of a conflict. It is imported from @dynamic-labs/sdk-react-core.

Annotation

export declare const mergeNetworks: (priorityNetworks: GenericNetwork[], secondaryNetworks: GenericNetwork[]) => GenericNetwork[];

Example

It is commonly used when you declare custom EVM networks or custom SVM networks for Dynamic, and you want to merge them with the networks you get from the dashboard configurations:
import { mergeNetworks } from "@dynamic-labs/sdk-react-core";

const myEvmNetworks = [
    ...
]

const mySolNetworks = [
    ...
]

const DynamicSettings = {
  overrides: {
    evmNetworks: (networks) => mergeNetworks(myEvmNetworks, networks),
    solNetworks: (networks) => mergeNetworks(mySolNetworks, networks),
  }
};
Last modified on June 25, 2026