This document outlines the steps to migrate from the old @web3modal packages to the new multichain @reown/appkit packages in your React Native project.
Overview of Changes#
The new AppKit architecture introduces a core library with pluggable chain adapters, providing better support for multiple blockchains (EVM, Solana, Bitcoin) in a single integration.
Key Changes:
- Core Library: Use
@reown/appkit-react-nativeas the main package - Chain Adapters: Install specific adapters for each blockchain you want to support
- Unified API: All hooks and components are imported from the core package
- Multichain Support: Native support for EVM, Solana, and Bitcoin chains
Step 1. Replace the dependencies using package manager commands
For Yarn users:
Remove the old Web3Modal packages:
Add the new Reown AppKit packages:
AppKit is only compatible with wagmi 2.x. Ensure you are using a compatible version.
Step 2. Update your AppKit configuration
Create a new AppKitConfig.ts file with the multichain setup:
Step 3. Update your App.tsx with providers
Step 4. Update your component with AppKit UI
Step 5. Update your Hooks usage
Update your hook imports as follows:
Step 6. Update your Components usage
Update your component imports as follows:
Step 7. Update your config for Universal Wallets
Remove email wallet specific imports as follows:
Step 8. Update your import to support Coinbase Wallet
Update coinbase connector import as follows:
- If you are using ethers v5, follow the same steps but replacing
etherswithethers5
Step 1. Replace the dependencies using package manager commands
For Yarn users:
Remove the old Web3Modal packages:
Add the new Reown AppKit packages:
Step 2. Update your AppKit configuration
Create a new AppKitConfig.ts file with the multichain setup:
Step 3. Update your App.tsx with providers
Step 4. Update your component with AppKit UI
Step 5. Update your Hooks usage
Update your hook imports as follows:
Step 6. Update your Components usage
Update your component imports as follows:
Step 7. Remove email wallet specific imports as follows:
Step 8. Update your import to support Coinbase Wallet
Update coinbase connector import as follows:
Key Migration Notes#
New Hook Structure#
useWeb3Modal→useAppKit(includesopen,close,disconnect,switchNetwork)useWeb3ModalState→useAppKitStateuseWeb3ModalEvents→useAppKitEventSubscriptionuseWeb3ModalAccount→useAccountuseWeb3ModalProvider→useProvideruseDisconnect→useAppKit
New Component Structure#
Web3Modal→AppKitW3mButton→AppKitButtonW3mConnectButton→ConnectButtonW3mAccountButton→AccountButtonW3mNetworkButton→NetworkButton
Multichain Support#
The new AppKit supports multiple blockchains natively. You can add support for Solana and Bitcoin by installing their respective adapters:
Then add them to your AppKitConfig.ts:
Final notes#
- Ensure that you have updated all relevant configurations and imports in your project to reflect the changes from Web3Modal to the new multichain AppKit.
- Test your application thoroughly to ensure that the migration has been successful and that all functionality is working as expected.
- Check our AppKit examples for React Native to compare with your implementation in case you are having issues
- For detailed information about the new architecture, see the Migration to Multichain guide