npm
The most common package manager for Node.js projects.
npm install rnc-theme
Get started with RNC Theme by installing the package and its required dependencies. This guide will walk you through the complete installation process for different environments.
npm
The most common package manager for Node.js projects.
npm install rnc-theme
yarn
Fast, reliable, and secure dependency management.
yarn add rnc-theme
pnpm
Efficient package manager with shared dependencies.
pnpm add rnc-theme
bun
Ultra-fast JavaScript runtime and package manager.
bun add rnc-theme
RNC Theme requires several peer dependencies to function properly. Choose the installation method that matches your project setup:
Install Core Dependencies with Expo CLI
npx expo install react-native-reanimatednpx expo install react-native-gesture-handlernpx expo install @react-native-async-storage/async-storagenpx expo install lucide-react-nativenpx expo install react-native-calendarsnpx expo install @shopify/flash-list
Install Optional Dependencies Feature Specific
npx expo install @react-navigation/native react-native-safe-area-contextnpx expo install expo-localization i18n-js
Install Core Dependencies with Expo CLI
yarn add install react-native-reanimatedyarn add install react-native-gesture-handleryarn add install @react-native-async-storage/async-storageyarn add install lucide-react-nativeyarn add install react-native-calendarsyarn add install @shopify/flash-list
Install Optional Dependencies Feature Specific
yarn add install @react-navigation/native react-native-safe-area-contextyarn add install expo-localization i18n-js
Install Core Dependencies with Expo CLI
pnpm add install react-native-reanimatedpnpm add install react-native-gesture-handlerpnpm add install @react-native-async-storage/async-storagepnpm add install lucide-react-nativepnpm add install react-native-calendarspnpm add install @shopify/flash-list
Install Optional Dependencies Feature Specific
pnpm add install @react-navigation/native react-native-safe-area-contextpnpm add install expo-localization i18n-js
Install Core Dependencies with Expo CLI
bunx expo install react-native-reanimatedbunx expo install react-native-gesture-handlerbunx expo install @react-native-async-storage/async-storagebunx expo install lucide-react-nativebunx expo install react-native-calendarsbunx expo install @shopify/flash-list
Install Optional Dependencies Feature Specific
bunx expo install @react-navigation/native react-native-safe-area-contextbunx expo install expo-localization i18n-js
module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ // Other plugins... 'react-native-reanimated/plugin', // ⚠️ Must be last! ],};
RNC Theme includes comprehensive TypeScript definitions. Update your tsconfig.json
:
{ "compilerOptions": { "strict": true, "esModuleInterop": true, "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true }, "include": [ "**/*.ts", "**/*.tsx" ]}
Package | Minimum Version | Recommended | Status |
---|---|---|---|
React | 19.0.0+ | Latest | Required |
React Native | 0.79.3+ | Latest | Required |
React Native Reanimated | 3.0.0+ | 3.15.0+ | Required |
React Native Gesture Handler | 2.0.0+ | 2.18.0+ | Required |
AsyncStorage | 2.0.0+ | Latest | Required |
Lucide React Native | 0.513.0+ | Latest | Required |
React Navigation | 6.0.0+ | Latest | Required |
React Native Calendars | 1.1200.0+ | Latest | Required |
FlashList | 1.8.0+ | Latest | Required |
Create a test component to verify your installation:
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';import { Stack, usePathname } from 'expo-router';import { RNCProvider } from 'rnc-theme';import { GestureHandlerRootView } from 'react-native-gesture-handler';import 'react-native-reanimated';
export default function RootLayout() { return <RootLayoutNav />;}
function RootLayoutNav() { return ( <ThemeProvider> <GestureHandlerRootView> <RNCProvider> {/* stack or children */} <Stack> <Stack.Screen name="index" /> </Stack> </RNCProvider> </GestureHandlerRootView> </ThemeProvider> );}
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';import { Stack, usePathname } from 'expo-router';import { RNCProvider } from 'rnc-theme';import { GestureHandlerRootView } from 'react-native-gesture-handler';import 'react-native-reanimated';
export default function RootLayout() { return <RootLayoutNav />;}
function RootLayoutNav() { return ( <ThemeProvider> <GestureHandlerRootView> <RNCProvider> {/* stack or children */} <Stack> <Stack.Screen name="index" /> </Stack> </RNCProvider> </GestureHandlerRootView> </ThemeProvider> );}
Metro Bundler Errors
Reanimated Errors
Solution: Check Babel configuration
react-native-reanimated/plugin
is last in plugins arrayGitHub Issues
Report bugs and request features
Community Discussions
Get help from the community
Documentation
Browse comprehensive guides
Examples
See working implementations