Gathering detailed insights and metrics for create-rn-starter-kit
Gathering detailed insights and metrics for create-rn-starter-kit
Gathering detailed insights and metrics for create-rn-starter-kit
Gathering detailed insights and metrics for create-rn-starter-kit
npm install create-rn-starter-kit
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
This package is being renamed and restructured. Please use
create-dn-starter-kit
instead.Not recommended for production use - This package is experimental and subject to breaking changes without notice.
A CLI tool for creating modular React Native applications with Expo. This tool generates customizable projects with a modular architecture using pre-configured templates for rapid prototyping.
1# Create a new project 2npx create-rn-starter-kit my-app 3 4# Navigate to the project directory 5cd my-app 6 7# Start the development server 8npm start
1create-rn-starter-kit my-app
The CLI will prompt you to select which template you want to use for your project.
1create-rn-starter-kit my-app --yes
my-app/
├── src/
│ ├── config/
│ │ ├── modules.ts # Module definitions
│ └── modules/
│ ├── core/ # Essential modules
│ └── feature/ # Optional feature modules
├── assets/ # Static assets
├── App.tsx # Main app component
├── app.json # Expo configuration
├── package.json # Dependencies
└── tsconfig.json # TypeScript config
The project uses a template-based module system defined in src/config/modules.ts
. Each template includes a pre-selected set of modules that work together seamlessly.
Want to add your own modules? Here's how:
1# For core modules 2mkdir -p src/modules/core/your-module 3 4# For feature modules 5mkdir -p src/modules/feature/your-module
Create your module component:
1// src/modules/feature/your-module/index.tsx 2import React from 'react'; 3import { View, Text, StyleSheet } from 'react-native'; 4 5const YourModule = () => { 6 return ( 7 <View style={styles.container}> 8 <Text style={styles.title}>Your Custom Module</Text> 9 {/* Add your module content here */} 10 </View> 11 ); 12}; 13 14const styles = StyleSheet.create({ 15 container: { 16 flex: 1, 17 justifyContent: 'center', 18 alignItems: 'center', 19 }, 20 title: { 21 fontSize: 18, 22 fontWeight: 'bold', 23 }, 24}); 25 26export default YourModule;
Add your module to src/config/modules.ts
:
1{ 2 id: 'your-module', 3 name: 'Your Module', 4 description: 'Description of what this module does', 5 category: 'feature', // or 'core' 6 enabled: true, 7 dependencies: [], // List any required modules 8 priority: 10, // Loading priority (lower numbers load first) 9 importFn: () => import('../modules/feature/your-module'), 10}
Import and use your module in your App component:
1// App.tsx (or your specific App.<template>.tsx) 2import React from 'react'; 3import YourModule from './src/modules/feature/your-module'; 4 5const App = () => { 6 return ( 7 <YourModule /> 8 // Or integrate it into your navigation/layout 9 ); 10}; 11 12export default App;
Start the development server to test your changes:
1npm start
Modules communicate through standard React patterns:
Example using React Context:
1// src/context/AppContext.tsx 2import React, { createContext, useContext } from 'react'; 3 4const AppContext = createContext(null); 5 6export const AppProvider = ({ children }) => { 7 const [user, setUser] = useState(null); 8 9 return ( 10 <AppContext.Provider value={{ user, setUser }}> 11 {children} 12 </AppContext.Provider> 13 ); 14}; 15 16export const useApp = () => useContext(AppContext);
Then use it in your modules:
1// In your module 2import { useApp } from '../../context/AppContext'; 3 4const YourModule = () => { 5 const { user } = useApp(); 6 7 return ( 8 <Text>Welcome, {user?.name}</Text> 9 ); 10};
For detailed contribution guidelines, including CLI development, see CONTRIBUTING.md.
No vulnerabilities found.
No security vulnerabilities found.