I'm using React Native 0.71.x in my project and have react-native-fast-image
which does not support the latest Fabric architecture. So I'd like to disable it if possible. How do I go about doing this? I haven't set up anything specifically for fabric so I guess it is enabled by default.
Asked
Active
Viewed 613 times
1

Zephyr
- 1,612
- 2
- 13
- 37
-
I'm using react-native-maps and as of today, it's still not compatible with Fabric https://github.com/react-native-maps/react-native-maps/issues/4383 – Punter Bad Aug 16 '23 at 09:44
1 Answers
2
Follow what is said in React Native's documentation to enable it, and do the opposite.
Assuming that you're coding an app for Android:
MyApplication.java
public class MyApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
// Remove those lines:
@Nullable
@Override
protected JSIModulePackage getJSIModulePackage() {
return new JSIModulePackage() {
@Override
public List<JSIModuleSpec> getJSIModules(
final ReactApplicationContext reactApplicationContext,
final JavaScriptContextHolder jsContext) {
final List<JSIModuleSpec> specs = new ArrayList<>();
specs.add(new JSIModuleSpec() {
@Override
public JSIModuleType getJSIModuleType() {
return JSIModuleType.UIManager;
}
@Override
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
final ComponentFactory componentFactory = new ComponentFactory();
CoreComponentsRegistry.register(componentFactory);
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
ViewManagerRegistry viewManagerRegistry =
new ViewManagerRegistry(
reactInstanceManager.getOrCreateViewManagers(
reactApplicationContext));
return new FabricJSIModuleProvider(
reactApplicationContext,
componentFactory,
new EmptyReactNativeConfig(),
viewManagerRegistry);
}
});
return specs;
}
};
}
};
}
gradle.properties
# Set this line to false
newArchEnabled=true

MidKnight
- 75
- 7