The pattern that makes it broadly useful: imperative configuration, framework-agnostic.
initApp doesn't assume React. The same call works in Angular, Vue, Solid, Next.js, React Native โ anywhere JavaScript runs in the browser.
initApp({
dAppConfig: {
environment: EnvironmentsEnum.devnet,
nativeAuth: { origin, apiAddress, expirySeconds: 86400 },
theme: 'dark',
providers: { walletConnect: { walletConnectV2ProjectId: 'YOUR_ID' } },
transactionTracking: { onSuccess, onFail }
},
customProviders: []
});
Initialization order is fixed inside the function. State managers, store, providers, listeners โ wired in the correct sequence regardless of who calls it.