Why build iOS and Android apps with React Native?
- Prototype rapidly.
- Share code, often 80-90% of the codebase.
- The same designers and developers can contribute to the web app and mobile app.
- Save a file and see app reload.
- Use existing text editor.
- The compiled apps are native and performant.
This article describes a macOS setup and Vim configuration for React Native with Expo and Prettier.
brew update brew install node brew install watchman brew upgrade brew cleanup brew cask cleanup npm install prettier --global
For Vim, install these plugins:
" Auto-format on save augroup fmt autocmd! autocmd BufWritePre *.js,*.jsx Neoformat prettier augroup END
Create a new project from their dropdown menu. This will download the appropriate files and build the project.
Download the Expo Client iPhone app. Open it. From within the Expo Client app, scan the project’s QR code in the Expo XDE. Expo Client reloads the app on your phone!
Edit a file such as
screens/HomeScreen.js in Vim.
Save the file.
Prettier re-formats it on save (no linting necessary)
and Expo Client reloads the app on your phone.