- Use React following the React Guide
- Use TypeScript
- Prefer using core components and apis over writing bespoke components.
- Start new projects with create-belt-app
- Use Expo
- Use Expo EAS for continuous deployment
- Use Expo Secure Store for storing sensitive data like auth and refresh tokens
- Use React Navigation for routing
- Use TanStack React Query as an API client for REST APIs
- Use Apollo Client as an API client for GraphQL APIs
- Use Redux Toolkit for global state
- Avoid storing API data in a global store. Instead, use a dedicated API client.
- Use React Native Firebase for push notifications
- Use Sentry for error reporting
- Prefer RevenueCat for in-app payments
- If RevenueCat pricing is not acceptable since it collects a percentage of revenue, use react-native-iap
- Prefer using StyleSheets
- Prefer organized and composable styles
- Avoid designing for only one platform.
- Avoid designing for only one screen size.
- Prefer common mobile patterns and avoid non-standard patterns.
- Test using React Native Testing Library and Jest
- Mock API calls in tests using MSW. If using Apollo Client, mock using the built-in
MockedProvider
- Prefer testing on physical devices.
- Use detox for integration tests.