Create dynamic pages in your React Native apps in real-time. Load components from API, cache intelligently, and deliver seamless offline experiences.
Powerful features for dynamic component management
Load component templates from remote APIs with configurable endpoints and account IDs.
Automatic caching with AsyncStorage ensures fast loading and offline availability.
Compile and execute components at runtime with full dependency injection support.
Customize API endpoints, cache behavior, and timeouts at runtime or build time.
Full TypeScript support with type-safe component props and configuration.
Graceful fallback to cached templates and hardcoded components when offline.
Get started in minutes with our intuitive API
import DynamicComponent from 'react-native-dpage';
function App() {
return (
<DynamicComponent
template="AddOne"
/>
);
}Load any component template dynamically with a simple template name.
<DynamicComponent
template="Counter"
data={{
initialValue: 100
}}
/>Pass data to your dynamic components just like regular React components.
import { preloadComponents } from 'react-native-dpage';
useEffect(() => {
preloadComponents([
'AddOne',
'Counter'
]);
}, []);Preload components on app start for instant rendering later.
import {
getCacheStats,
clearComponentCache
} from 'react-native-dpage';
const stats = await getCacheStats();
console.log(`Cached: ${stats.count}`);
await clearComponentCache('AddOne');Full control over caching with utilities for stats and cleanup.
Get up and running in less than a minute
npm install react-native-dpageyarn add react-native-dpagenpm install @react-native-async-storage/async-storageimport DynamicComponent from 'react-native-dpage';
function MyScreen() {
return <DynamicComponent template="YourComponent" />;
}💡 Tip: Check out the documentation for advanced configuration, cache management, and API setup.