Skip to content

☂️ React Native Compatibility Tracker 2.0 #12

@leotm

Description

@leotm

Priority matrix

  • SES: module / lockdown shim
  • JS engine: JSC* / V8 (debug) / Hermes / more
  • JS transformer: Babel / SWC, react-codemod
  • JS features: BigInt / Promises / etc, libs
  • RN version: <=0.66.x / 0.66.5* metamask-mobile / 0.69.x* / 0.70.x / 0.71.x metamask-mobile / 0.72.x / 0.73.x
    • min: platform :ios, '11.0' 0.69+: 12.4
  • RN bundler: Metro / Re.Pack / rn-esbuild, bundling / sourcemaps
  • RN platform: Android / iOS / rn-web / rn-macos / rn-windows
  • RN variant* mode: debug / release
  • RN arch: old / new**
  • SES integration: entry file / RN core

* undergoing retirement
** 3rd party libs not yet mature, but issues prioritised

Tracker

metamask-mobile

  • LogBox.ignoreLogs([...])
  • deps (Sentry, eth...)
  • e2e (Detox/(Appium))
    • 4.3. Enabling unencrypted traffic for Detox

      For Detox to work, its native code running on Android device has to be able to connect to the Node.js host running tests. It sends an unencrypted HTTP traffic via virtual localhost interface, that's why you need to create a new file which adds a couple of exceptions to the security rules.
      If properly configured, this approach in no way compromises the security settings of your app. For more details, refer to Android’s security-config guide and the dedicated article in the Android developers blog.

Notes

RN 0.66.5 types (globals.d.ts) (js global objects)

android-jsc (fbarchive) (debug-mode, release-mode)
"jsc-android": "^250231.0.0" (WebKitGTK 2.26.1) pre-RN 0.72
jscFlavor = 'org.webkit:android-jsc:+' (or jscFlavor = 'org.webkit:android-jsc-intl:+')
pre-release: v294992.0.0 (WebKitGTK 2.36.3) (only jscFlavor = 'org.webkit:android-jsc-intl:+')
Moved out of package.json in 0.72-stable | RN Monorepo | Migrate to package

v8-android (debug-mode: Remote JS Debugging, opt-in: release-mode)
v11.110.1 (jit/aot, intl/nointl)

Simplified model of moving parts (todo: interactive diagram)

javascript-environment: RN JS engines (3), transforms (~37), polyfills (11)

JavaScriptCore does not use JIT due to the absence of writable executable memory in iOS apps

When using Chrome debugging, all JavaScript code runs within Chrome itself, communicating with native code via WebSockets. Chrome uses V8 as its JavaScript engine

RN JS features per engine/platform table (excluding with)

metro-react-native-babel-preset v0.76.0
facebook/metro@e5950ae: [Breaking]: Increase minimum Node version from 14 to 16
package.json: 36 plugins
main.js: 23 extraPlugins.push
babel > packages

tc39: terminology glossary

Node (debug via cli-doctor)

Screenshot 2023-03-20 at 11 46 50

Screenshot 2023-03-20 at 11 46 56

https://drive.google.com/file/d/1mgKxKlpgjm2_KX4TP-G7hUti-JKjR2Xv/view

https://tmikov.blogspot.com/2023/09/how-to-speed-up-micro-benchmark-300x.html

https://www.youtube.com/watch?v=q-xKYA0EO-c

Join the convo 🌍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions