pivot-expo v1.0.0
pivot-expo
This is the cross-platform client application for the Pivot platform. We build for iOS, Android, and web based on this React Native project.
React Storybook
It is worth reading this article on Design System in order to have a good idea of how we should be building some of our components and understanding Storybook in general.https://storybook.js.org
Important Storybook Links
All references to
.js
or.jsx
should be converted to.ts
or.tsx
respectively.
Testing
For testing we are using React Testing Library together with Jest
GraphQL
Apollo Studio
Create a new api key here and add APOLLO_KEY
to your global environment with the value of the newly created key.
- Schema Generation: We use codegen to generate our graphql schema. This helps us share types between our backend and frontend. We use Apollo Rover to download the latest schema from Apollo Studio.
Environment Variables
Please make sure you have .env
with values similar to the ones in .env.example
. The environment variables are loaded inside app.config.ts
. This makes sure that the environment variables needed by the app are available to the application before you can build or start.
Importing and New Environment Variables.
You should only import the Config from src/config
. When new variables are needed, make sure to add them to the
interface, variables, .env and .env
Expo Dev Client
We have setup expo-dev-client in our app to support the bare react-native libraries in our expo manged workflow.
To start expo-dev-cleint based project run npm run start
inside apps/expo
.
This will propmt QRCode and other options on the console, where you can selete and option for your desired platform to test your app.
If you want to start directly on a specific platform (ios/android)
then run bellow inside apps/expo
:
ios
npm run ios
android
npm run android
how expo-dev-client works
Above 2 scripts will build the project and launch on android/ios(device/simulator) in case you have ios/android folder inside apps/expo
.
Otherwise it will generate android/ios folder inside apps/expo
, install dependencies (In case dependencies installation fails you can manually install by npm install
inside apps/expo
), pod install (for ios only), build for android/ios and launch on android/android(device/simulator).
2 years ago