Skip to content

Commit 9f43c24

Browse files
authored
Add React Native tooling preferences to guides (#700)
* Add React Native tooling preferences to guides These are defaults that our mobile team has standardized on over the past few years but not documented here. * Add more links * Tweak wording
1 parent 26aa87b commit 9f43c24

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

react-native/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66

77
[core components and apis]: https://reactnative.dev/docs/components-and-apis
88

9+
## Tooling
10+
11+
* Start new projects with [create-belt-app](https://www.npmjs.com/package/create-belt-app)
12+
* Use [Expo](https://expo.dev)
13+
* Use [Expo EAS](https://expo.dev/eas) for continuous deployment
14+
* Use [Expo Secure Store](https://docs.expo.dev/versions/latest/sdk/securestore/) for storing sensitive data like auth and refresh tokens
15+
* Use [React Navigation](https://reactnavigation.org/) for routing
16+
* Use [TanStack React Query](https://tanstack.com/query/v4/docs/framework/react/overview) as an API client for REST APIs
17+
* Use [Apollo Client](https://www.apollographql.com/docs/react/) as an API client for GraphQL APIs
18+
* Use [Redux Toolkit](https://redux-toolkit.js.org/) for global state
19+
* Avoid storing API data in a global store. Instead, use a dedicated API client.
20+
* Use [React Native Firebase](https://rnfirebase.io/) for push notifications
21+
* Use [Sentry](https://docs.sentry.io/platforms/react-native/) for error reporting
22+
* Prefer [RevenueCat](https://www.revenuecat.com/) for in-app payments
23+
* If RevenueCat pricing is not acceptable since it collects a percentage of revenue, use [react-native-iap](https://react-native-iap.dooboolab.com/docs/get-started/)
24+
925
## Style
1026

1127
- Prefer using [StyleSheets]
@@ -20,6 +36,8 @@
2036

2137
## Testing
2238

39+
- Test using React Native [Testing Library](https://callstack.github.io/react-native-testing-library/) and [Jest](https://jestjs.io/)
40+
- Mock API calls in tests using [MSW](https://mswjs.io/). If using Apollo Client, mock using the built-in `MockedProvider`
2341
- Prefer testing on physical devices.
2442
- Use [detox] for integration tests.
2543

0 commit comments

Comments
 (0)