I'm working on implementing dynamic bundle loading for React Native. Currently, ReactInstanceManager.Builder only supports asset:// and file:// protocols for loading JavaScript bundles.
I need to support in-memory cached bundles that are fetched and loaded into memory and passed directly to ReactInstanceManager without writing to the file system first.
Is this possible?
Something like
// Custom loader
public class PackageJSBundleLoader extends JSBundleLoader {
...
}
// and Application can pass it in RIM as:
return ReactInstanceManager.builder()
.setApplication(getApplication())
.setJSBundleLoader(bundleLoader) // Use Custom PackageLoader
.setJSMainModulePath(getJSMainModuleName())
.addPackages(getPackages())
.build();