Boilerplate React-native (Expo) Demo App
This is React Native (Expo) demo app for the Ethereum Comments Protocol.
It is very similar to the react demo app, but built with a React Native tech stack.
- Custom commenting UI
- Wallet integration via Reown AppKit
- Post and reply contract interactions via Reown AppKit
- Infinite scroll using
FlatList
Running the app
Prerequisites
- Start your local Anvil chain and deploy the protocols to your local chain. Folllow the instruction here.
- Configure your wallet app in your phone to use the local chain. In MetaMask, you need to make sure the RPC URL of local chain is accessible from your phone in order to add the custom RPC network.
- Follow the instruction in readme to start the indexer and the react demo app, as this demo uses the signing API from the react demo app.
You may want to test the app on your phone because it requires wallet app to post comments:
-
Install dependencies:
pnpm install
-
Create a
.env
file based on the.env.sample
file:cp .env.example .env
-
Update the
.env
file with your own values. -
Run the app:
pnpm run ios
alternatively, run the app as development build:
pnpm run dev:ios
-
Scan the QR code from the terminal with the Expo Go app on your phone.
Known issues:
- PNPM: Although PNPM team consider that is correct behavior, we experienced a couple times when upgrading libs (totally unrelated to wagmi, such as react-native-async-storage) in this repo, causing a duplicated
wagmi
package gets referenced bysdk
andshared
packages, this cause build issues for the other apps in the monorepo. We've tried solution from this issue but none of them permanently fixed the issue, we should consider writing a custom script to force linking the packages into the same folder. - AppKit: For error message about "_reactNative.BackHandler.removeEventListener is not a function (it is undefined)", please see: https://github.com/reown-com/appkit-react-native/issues/339