React Native Super App
What is a Super App?
A mobile super app is a single mobile application that integrates a wide range of services and features, allowing users to perform multiple tasks within one ecosystem. Instead of using separate apps for different purposes, a super app combines various functionalities, making it a one-stop solution for users.
π Our Current Setup
Our current setup consists of two separate applications:
- React Native CLI App (for major main features)
- Order
- Equipment
- Ticketing
- Financing
- etc
- React Native Expo App (for customer management)
- Developed using Expo
- Uses different libraries from the first app
π¨ Limitations of the Current Setup
β No unified architecture β apps are siloed, making cross-team collaboration harder.
β Duplicate dependencies and code.
β Harder to scale β each app requires separate maintenance and updates.
β
Native flexibility β React Native CLI allows direct native code modifications.
To transition into a super app, we are evaluating two potential tech stacks:
@callstack/repack
- Expo Router with Monorepo
π Tech Stack Evaluation
1οΈβ£ @callstack/repack
@callstack/repack
is a Webpack-based module bundler that supports advanced features like Module Federation for a micro-frontend architecture.
β Pros:
- Module Federation Support β Enables independent teams to develop and deploy features dynamically.
- Full Control Over Bundling β Fine-tune app bundling for better performance.
- Integration Flexibility β Works well with React Native CLI for native code modifications.
- Scalability β Facilitates integrating multiple features or services without tight coupling.
- Dynamic Updates β Supports independent deployment of app features.
β Cons:
- Steeper Learning Curve β Teams need to understand Webpack and Module Federation.
- Manual Configurations β Requires more setup compared to Expo.
- Build Complexity β Managing multiple modules dynamically introduces runtime challenges.
- Dependency Compatibility β Some libraries may require adjustments for Webpack.
2οΈβ£ Expo Router + Monorepo
Expo Router is a file-based routing system built on React Navigation. Using a monorepo allows teams to collaborate while sharing common code.
β Pros:
- Developer Experience β Simplified file-based routing.
- Expo Ecosystem β Handles native modules easily, ideal for teams with less native expertise.
- Monorepo Benefits:
- Centralizes shared libraries and components.
- Reduces duplication and ensures consistency across teams.
- Over-the-Air Updates β Simplifies updates without app store resubmissions.
- Lower Setup Overhead β Easier to start compared to
@callstack/repack
. - Good Library Support β Excellent compatibility with Expo-managed libraries.
β Cons:
- Limited Native Customization β Less flexibility compared to React Native CLI.
- Dependency Lock-In β Tied to Expoβs managed workflow.
- Scalability Challenges β Not as modular as
@callstack/repack
with Module Federation.
π Feature Comparison Table
Feature/Criteria | @callstack/repack | Expo Router + Monorepo |
---|---|---|
Learning Curve | Steeper | Easier |
Ease of Setup | Moderate (requires Webpack setup) | High (Expo handles much of it) |
Flexibility | High (full control over native code) | Medium (some limitations in Expo) |
Modularity | Excellent (supports Module Federation) | Good (monorepo supports modularity) |
Over-the-Air Updates | Possible but requires extra setup | Built-in with Expo |
Scalability | Excellent (dynamic federation) | Good (monorepo + shared packages) |
Library Compatibility | May require adjustments for Webpack | Excellent with Expo-managed libs |
Performance Optimization | High (customizable) | Medium (Expoβs bundler optimizations) |
π Creating a New React Native Base
1οΈβ£ Current Setup Issues
- Independent apps β No shared architecture.
- Separate dependencies β Each team uses different libraries.
- No cross-app feature sharing β Apps donβt share services or components.
π Project Structure
mobile-app/
βββ src/
β βββ assets/
β βββ hooks/
β βββ navigator/
β βββ screens/
β βββ services/
βββ package.json
βββ babel.config.js
βββ metro.config.js
βββ webpack.config.js
2οΈβ£ New Base with @callstack/repack
π Project Structure
super-app/
βββ packages/
β βββ app-shell/ # Core app shell (host)
β βββ order-module/ # Independent module (remote)
β βββ customer-module/ # Independent module (remote)
βββ mobile/ # Main entry for mobile
βββ package.json
βββ babel.config.js
βββ metro.config.js
βββ webpack.config.js
3οΈβ£ New Base with Expo Router + Monorepo
π Project Structure
super-app/
βββ apps/
β βββ mobile/ # Main app
β βββ customer/ # Customer app (child app)
βββ packages/
β βββ ui/ # Shared UI components
β βββ services/ # Shared API and state management
β βββ features/ # Feature modules (e.g., order)
β β βββ order/
β β βββ equipment/
βββ package.json
βββ babel.config.js
βββ expo-router.config.js
π Recommendation
Choose @callstack/repack
if:
β
You prioritize modularity, scalability, and independent deployments.
β
Your team has expertise in Webpack and Module Federation.
β
You need tight control over bundling and native configurations.
Choose Expo Router + Monorepo if:
β
Your team values simplicity and faster development workflows.
β
You can work within Expoβs managed workflow limitations.
β
You need quick integration of features with minimal setup effort.
π Final Verdict
For a super app with multiple independent teams, @callstack/repack
is the more scalable and future-proof choice. π
- True Modular Architecture β Each team can build, maintain, and deploy features independently without affecting the core app.
- Better Performance & Native Control β Unlike Expoβs managed workflow,
@callstack/repack
allows fine-grained control over optimizations and native modules. - Versioning & Deployment Flexibility β Teams can work on different versions of features without forcing the entire app to update simultaneously.
If your team lacks Webpack experience, starting with Expo Router can be an option for quick iteration, but investing in @callstack/repack
ensures better scalability, independence, and maintainability. π‘