It's possible to use by default V8 instead of JavascriptCore when the app is not in debug mode?
I found some issues in JavascriptCore and not in V8 and is annoying switching 😓
Thanks.
It's possible to use by default V8 instead of JavascriptCore when the app is not in debug mode?
I found some issues in JavascriptCore and not in V8 and is annoying switching 😓
Thanks.
You could do it by implementing the JSCExecutor using V8 API.
Also, you may consider Chakra as an option. https://github.com/Microsoft/react-native-windows has it integrated.
Have a look at J2V8 provided by EclipseSource. It provides various builds for unix, mac, windows and android and also comes bundled with NodeJS support.
I haven't seen it working with React Native yet, but it is used in the commercial TabrisJS, which provides similar cross-device support to RN.
J2V8 is open-source, and it should be possible to integrate the Java code such that it works with React Native. When RN project was started it was supposed to be able to run on any js engine (don't know if that is still true).
One of their blogs Shipping J2V8 as an AAR (Nov 2015) states using is as simple as adding to build.gradle
:
dependencies {
compile 'com.eclipsesource.j2v8:j2v8:3.1.0-SNAPSHOT@aar'
}
I've found a these github repo's using J2V8 (including one using nodejs).
I haven't used this yet, but it looks like an awesome project which enables you to use V8 in react-native: Kudo/react-native-v8
© 2022 - 2024 — McMap. All rights reserved.