Skip to content

Commit

Permalink
Add React Native tooling preferences to guides (#700)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
stevehanson committed Apr 3, 2024
1 parent 26aa87b commit 9f43c24
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions react-native/README.md
Expand Up @@ -6,6 +6,22 @@

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

## Tooling

* Start new projects with [create-belt-app](https://www.npmjs.com/package/create-belt-app)
* Use [Expo](https://expo.dev)
* Use [Expo EAS](https://expo.dev/eas) for continuous deployment
* Use [Expo Secure Store](https://docs.expo.dev/versions/latest/sdk/securestore/) for storing sensitive data like auth and refresh tokens
* Use [React Navigation](https://reactnavigation.org/) for routing
* Use [TanStack React Query](https://tanstack.com/query/v4/docs/framework/react/overview) as an API client for REST APIs
* Use [Apollo Client](https://www.apollographql.com/docs/react/) as an API client for GraphQL APIs
* Use [Redux Toolkit](https://redux-toolkit.js.org/) for global state
* Avoid storing API data in a global store. Instead, use a dedicated API client.
* Use [React Native Firebase](https://rnfirebase.io/) for push notifications
* Use [Sentry](https://docs.sentry.io/platforms/react-native/) for error reporting
* Prefer [RevenueCat](https://www.revenuecat.com/) for in-app payments
* 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/)

## Style

- Prefer using [StyleSheets]
Expand All @@ -20,6 +36,8 @@

## Testing

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

Expand Down

0 comments on commit 9f43c24

Please sign in to comment.