This Tramboard App starter is a React Native/Expo cross-platform mobile app which serves to support the Softwire React Native Tramboard training exercise.
- Node.js v16 and NPM
- Your IDE of choice (Intellij IDEA is recommended)
- Install the Expo CLI globally with
npm install -g expo-cli. - Install the project dependencies with
npm install.
- Install the Expo Go app on your phone from the Play Store/App Store.
- Run the code!
- Run in development mode with hot reloading with
npm start - If you have changed environment variables or otherwise want to clear the Expo cache, run
npm start -- --clear - To view the app on your own device, simply scan the QR code in the command line with the Expo Go app
- Make sure you're on the same Wi-Fi network
- Once loaded, making code changes to the code (remember to save your changes!) should hot-reload in the app
- Run in development mode with hot reloading with
- Download Android Studio
- Install with the recommended settings
- Start up a simulator by selecting "Configure" and "AVD"
- Connect to the simulator using
npm run android
⚠️ The iOS Simulator is only available on macOS. If you wish to test on iOS w/ a Windows machine, follow the above instructions to run on a physical iOS device.
Similar steps to Android can be used to run on iOS with npm run ios.
The code is linted using ESLint with Prettier for additional opinionated formatting of code style. You can check for linting issues with:
npm run lintTo fix all auto-fixable linting issues, run:
npm run lint:fixFiles do not autofix formatting on save or with git hooks. This is because I think it's useful to see what stylistic issues the linter has with your code rather than them just magically being fixed. This is for two reasons:
- It's a good way to learn.
- It means that any suboptimal linting rules are more likely to be noticed and challenged.
If anyone's interested to know about how you'd set up linting to fix itself on file save and/or commit, let me know!