OK so quick disclaimer: I’m not using Expo so not 100% how or if this will work.
BigInt should be available on iOS (at least iOS 14), but the issue is Android. The problem is that the default JSC bundled with an Android RN app doesn’t support BigInt AFAIK. I’m currently using v8 instead of JSC for Android. Make sure you enable JIT if you care about performance (see the docs).
You’ll probably hit errors with BigInt syntax for iOS and/or Android:
- The exponentiation ** operator might not be supported. You’ll have to manually patch the
@dfinity/agentlibrary to replace the ** code (in 6 files) with hardcoded static values.
- The BigInt
...nliteral syntax (e.g.
128n) might not be supported. You’ll also need to replace that with the BigInt constructor (e.g.
Some of these errors only happened when I built my RN app in release mode, so you might not see them initially… but they are there.
Oh yeah, after you solve BigInt, you’ll need to deal with WebAssembly.