ReChunk is a lightweight React Native library that enables secure over-the-air updates and dynamic component loading, allowing you to update your app's UI without app store submissions.
- π± Bypass App Store Updates: Deploy UI changes without waiting for app store approval
- π Instant Updates: Push changes to all users simultaneously
- π Developer Friendly: Simple API with TypeScript support
- π Performance First: Minimal bundle size impact and optimized loading
npm install @rechunk/core
npm install -D @rechunk/cli @rechunk/babel-plugin @rechunk/metro-config
# or
yarn add @rechunk/core
yarn add -D @rechunk/cli @rechunk/babel-plugin @rechunk/metro-config
# Create a new ReChunk project with a custom host
npx rechunk init -h https://your-rechunk-host.com -u username -p password
If you'd like to use the hosted ReChunk service at rechunk.xyz, you can run:
npx rechunk init --host https://rechunk.xyz/api/v1 --username admin --password password123
Note: This project is currently in beta. As we continue to improve the platform, certain aspects, such as authentication mechanisms (e.g., basic auth), may change in the future. Stay tuned for updates in our documentation and changelogs.
// components/FeatureCard.tsx
'use rechunk';
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';
import React, {useState} from 'react';
interface FeatureCardProps {
title: string;
description: string;
onPress?: () => void;
}
export default function FeatureCard({
title = 'New Feature',
description = 'Try out our latest update!',
onPress,
}: FeatureCardProps) {
const [pressed, setPressed] = useState(false);
const handlePress = () => {
setPressed(true);
onPress?.();
};
return (
<TouchableOpacity
style={[styles.container, pressed && styles.pressed]}
onPress={handlePress}>
<View style={styles.content}>
<Text style={styles.title}>{title}</Text>
<Text style={styles.description}>{description}</Text>
</View>
</TouchableOpacity>
);
}
const styles = StyleSheet.create({
// ... styles remain the same
});
// babel.config.js
const {withReactNativeBabelPresetOptions} = require('@rechunk/babel-plugin');
module.exports = {
presets: [
[
'module:metro-react-native-babel-preset',
api => withReactNativeBabelPresetOptions(api),
],
],
plugins: ['@rechunk/babel-plugin'],
};
// metro.config.js
const {cacheVersion} = require('@rechunk/metro-config');
module.exports = {
cacheVersion,
// ... other Metro configuration
};
// App.tsx
import React, {Suspense} from 'react';
import {View, ActivityIndicator} from 'react-native';
import ReChunk from '@rechunk/core';
import FeatureCard from './FeatureCard';
export default function App() {
return (
<Suspense fallback={<ActivityIndicator />}>
<FeatureCard
title="Welcome!"
description="This component was loaded dynamically!"
onPress={() => console.log('Pressed!')}
/>
</Suspense>
);
}
# Start development server
npx rechunk dev-server
# Or publish to production
npx rechunk publish
- Start Development Server
npx rechunk dev-server
-
Mark Components for Remote Loading Add the
"use rechunk"
directive to any component you want to load remotely. -
Configure Environment
# Development
export RECHUNK_ENVIRONMENT=dev
# Production
export RECHUNK_ENVIRONMENT=prod
# Offline testing
export RECHUNK_ENVIRONMENT=offline
- Publish Components
npx rechunk publish
- Manage Deployments
npx rechunk manage
- π Over-The-Air Updates: Deploy React Native components instantly without app store submissions. Push UI changes directly to your users in real-time.
- β‘οΈ Zero-Config Hosting: Host your components anywhere - from S3 to your own servers. Zero vendor lock-in, maximum flexibility.
- π Built-in Security: Industry-standard digital signatures verify every component. Keep your dynamic updates secure and your users protected.
Visit our Quick Start Guide to begin using ReChunk in your project.
Join our growing community! We're excited to help and hear your feedback:
Please read our Contributing Guide and help us build ReChunk together. For questions or feedback, feel free to open an issue.
Please review our Code of Conduct for guidelines on community interaction.
ReChunk is licensed under the MIT License.