To set up a project with Expo and React Native, go through the following steps:
-
Install dependencies:
$ npm i
-
Run
bb dev
to start expo dev server and squint watcher to hot-reload yor project
If you want to setup project from scratch:
-
Initialize a new Expo app
$ npx create-expo-app expo-react-native
-
Create a
squint.edn
to specify the source directories, output directory for compiled js-files and to use the.jsx
extension for outputted filesSee squint.edn
-
Change the contents of the App.js file to:
import App from './out-js/App'; export default App;
This is necessary so that the expo can see your app entry point.
-
Run expo dev server
$ npx expo start
-
Run squin watcher
$ npx squint watch