I added the library to the package.json and added the example code to the default app template, but then I get an error “Can’t find variable: BigInt”. (snack.expo.io v41 on Android)
How can I work around this error? I did some research, it seems BigInt was introduced to TypeScript some time ago, but I did not get any of the mentioned work-arounds to work for me.
Comment: “BigInt is one of the new feature of the ECMAScript 2020, and I think react native does not support latest ECMAScript”
Use: @babel/plugin-syntax-bigint. Is that with possible with Snack? https://github.com/facebook/react-native/issues/28492
Use: if (typeof BigInt === ‘undefined’) global.BigInt = require(‘big-integer’);
Does not seem to work when used in App.js.
Use big-integer as polifill. Just adding in package.json doesn’t help.