We made the choice to distinguish a MiniApp from a full-fledged React Native application considering that a MiniApp is not a complete application on its own--but rather a "mini" application that can be combined with other MiniApps to form parts of a mobile application.
A MiniApp can be a single, simple UI component with minimal logic or it can be a single page application that includes business logic and can communicate with the native side.
A MiniApp can be a multi-page application containing a complete application feature.
A MiniApp can be shipped and updated inside a mobile application, either included as a native container for in-development mobile application version or as an Over The Air (OTA) update for released mobile application versions.
While your actual coding experience won't change, the CLI commands you'll interact with will be slightly different. Some of the commands from the React Native CLI have been replaced with a few Electrode Native CLI commands.
For example, instead of running the
react-native run-ios command to launch your React Native MiniApp inside an iOS simulator or real device, you will use the
ern run-ios command.
Instead of using the
react-native start command, you'll use the
ern start command. Most of these commands will actually invoke the associated React Native commands, but the Electrode Native CLI commands perform additional platform-specific logic. Also, you won't have to use the React Native
react-native link command due to the fact that supported native dependencies will be automatically linked.
Activities on Android and
ViewControllers on iOS--and launch them when appropriate, based on your overall mobile application UX flow.
Interactions and communication between the MiniApps and your mobile application are conducted using APIs that are also part of your container. The APIs can be consumed in your mobile application in a way that is very intuitive and mobile-development friendly--while also leveraging a high degree of type-safety at compile time.
There are a few considerations and recommendations that you want to read about before using Electrode Native.
The Electrode Native platform currently does not ship with its own navigation library nor does it reuse a specific navigation library.
Currently Electrode Native does not ship with a navigation mechanism. As of now, if you want your MiniApp to reach maximum reusability and maximum reach potential, you should consider writing single page MiniApps. For example, MiniApps that are composed of a single screen only and do not involve navigation from one screen to another screen.
This recommendation does not apply to "private" MiniApps that might be used only within your own organization. With private MiniApps, there are many ways to develop the MiniApps to integrate your existing mobile application native navigation as you don't need these MiniApps to be used by external mobile applications.
Third-party native modules
However, the Electrode Native platform also does not support "all" third-party native modules. Each native module needs to be listed in the platform manifest and configurations must be modified so that the native modules can be properly injected into any container.
Considering that the Electrode Native master manifest is a public GitHub repository, and is not bound to a specific platform release lifecycle--anyone can contribute to it in order to add new native module support for their own--as well as any other developer's use!
CodePush OTA updates
We don't have a solution in place yet to customize OTA updates for MiniApps. If you are open sourcing a MiniApp, you should not use CodePush -yet- in your MiniApp, as its configuration might need to vary from mobile application to mobile application. We are working on bringing a solution to this so that mobile applications using your MiniApp will be able to customize its CodePush configuration on the fly based on their needs. Expect to hear more about this soon.