If you're a top-down learner and you would like to get a high-level understanding of what it looks like to build an app with the bare workflow, this is the right place for you. Feel free to skip this if you just want to write code as quickly as possible — Up and Running is for you.
Initialize a project
If you’re just starting a new bare project then you should initialize it with expo-cli so it will be preconfigured to include relevant Expo tools.
Note: You may see several peerDependencies warnings when installing the dependencies for a new project. These are caused by some external packages having overly strict or unnecessary dependencies, and it's a work in progress to clean them up. They won't cause any harm to your project.
Existing React Native apps
If you already have a React Native project that has been created with react-native init, ignite init, or another similar tool, we'll need to install and configure the react-native-unimodules package to enable you to use packages from the Expo SDK.
Note: We moved superhumanly fast in this video. You're not meant to follow along, we just want to give you a rough sense of what's involved in this process. Full instructions to get set up are available in the react-native-unimodules README.
Existing Expo managed workflow apps
If you already have an Expo managed workflow app and you need to customize the native code, you can eject to the bare workflow by running expo eject. This will give you a vanilla React Native app that includes all of the Expo SDK APIs that you were using already, and no more than that. The outcome is that you will be in just as good of a position as if you had started your app in the bare workflow from scratch, only you probably saved yourself some time!
Build and open the project
Adding a library from the Expo SDK
To add a library from the Expo SDK we install it with expo install, run pod install to link the iOS native dependency, and then recompile our projects for iOS and Android.
Adding your own custom native code
The process for doing this is the same as any other React Native app. Here we are adding react-native-mapbox-gl to the app we just ejected.
Open the project with the Expo client app on iOS or Android
You can continue using the Expo client even after you’ve added native code that the client doesn’t support, you just need to add guards to prevent the native APIs from being invoked when they aren’t available. In this block of code, we're going to prevent the AttractionList component from being imported when we were in the Expo client, because AttractionList uses react-native-mapbox-gl, which is not included in the Expo SDK.
Now when we go to the screen where you would expect to see the AttractionList, we won't see anything because we substituted a plain View in its place.
Open the app in your web browser
Expo for web also works on bare projects. Here we will just import one simple component into App.web.js to demonstrate it, and run expo start --web.
Releasing to App Store and Play Store
This is entirely up to you! The Expo build service does not yet support builds for the bare workflow.
Over the air updates
This is also up to you! The Expo updates service does not yet support over the air updates for the bare workflow.
You are now, at a very high level, familiar with the steps you would go through to get started on building an app with the bare workflow. Continue on to Up and Running to get started coding!
Are you feeling intimidated? It might be better for you to start out with the managed workflow if you're new to this. Check out the managed workflow walkthrough for more information.