xref: /expo/docs/pages/tutorial/introduction.mdx (revision f2fad9b1)
1*f2fad9b1SAman Mittal---
2*f2fad9b1SAman Mittaltitle: Introduction
3*f2fad9b1SAman Mittal---
4*f2fad9b1SAman Mittal
5*f2fad9b1SAman Mittalimport Highlight from '~/components/plugins/Highlight';
6*f2fad9b1SAman Mittalimport { SnackInline } from '~/ui/components/Snippet';
7*f2fad9b1SAman Mittalimport Video from '~/components/plugins/Video';
8*f2fad9b1SAman Mittal
9*f2fad9b1SAman MittalWe're about to embark on a journey of building universal apps. In this tutorial, we'll create a universal app that runs on Android, iOS, and the web; all with a single codebase. Let's get started!
10*f2fad9b1SAman Mittal
11*f2fad9b1SAman Mittal## About this tutorial
12*f2fad9b1SAman Mittal
13*f2fad9b1SAman MittalThe objective of this tutorial is to get started with Expo and become familiar with the Expo SDK. It'll cover the following topics:
14*f2fad9b1SAman Mittal
15*f2fad9b1SAman Mittal- Create an Expo App
16*f2fad9b1SAman Mittal- Break down the app layout and implement it with flexbox
17*f2fad9b1SAman Mittal- Use each platform's system UI to select an image from the media library
18*f2fad9b1SAman Mittal- Create a sticker modal using the `<Modal>` and `<FlatList>` components from React Native
19*f2fad9b1SAman Mittal- Add touch gestures to interact with a sticker
20*f2fad9b1SAman Mittal- Use third-party libraries to capture a screenshot and save it to the disk
21*f2fad9b1SAman Mittal- Handle platform differences between Android, iOS, and web
22*f2fad9b1SAman Mittal- Finally, go through the process of configuring a status bar, a splash screen, and an icon to complete the app
23*f2fad9b1SAman Mittal
24*f2fad9b1SAman MittalThese topics will provide a good foundation for learning the fundamentals of building a mobile app. The tutorial is self-paced and can take two to three hours to complete.
25*f2fad9b1SAman Mittal
26*f2fad9b1SAman MittalTo keep it beginner friendly, we divided the tutorial into eight chapters so that you can follow along or put it down and come back to it later. Each chapter also contains all the necessary code so that you can follow along by creating an app from scratch or using Snack examples to copy and paste the code if you get lost.
27*f2fad9b1SAman Mittal
28*f2fad9b1SAman MittalBefore we get started, take a look at what we'll build. It's an app named **StickerSmash** that runs on Android, iOS, and the web:
29*f2fad9b1SAman Mittal
30*f2fad9b1SAman Mittal<Video file="tutorial/final.mp4" />
31*f2fad9b1SAman Mittal
32*f2fad9b1SAman Mittal## How to use this tutorial
33*f2fad9b1SAman Mittal
34*f2fad9b1SAman MittalWe believe in [learning by doing](https://en.wikipedia.org/wiki/Learning-by-doing) so this tutorial emphasizes doing over explaining. You can follow along the journey of building the app by creating the app from scratch.
35*f2fad9b1SAman Mittal
36*f2fad9b1SAman MittalThroughout the tutorial, any important code or code that has changed between examples will be <Highlight>highlighted in yellow</Highlight>. You can hover over the highlights (on desktop) or tap them (on mobile) to see more context on the change. For example, the code highlighted in the snippet below explains what it does:
37*f2fad9b1SAman Mittal
38*f2fad9b1SAman Mittal<SnackInline label="Hello world">
39*f2fad9b1SAman Mittal
40*f2fad9b1SAman Mittal{/* prettier-ignore */}
41*f2fad9b1SAman Mittal```jsx
42*f2fad9b1SAman Mittalimport { StyleSheet, Text, View } from 'react-native';
43*f2fad9b1SAman Mittal
44*f2fad9b1SAman Mittalexport default function App() {
45*f2fad9b1SAman Mittal  return (
46*f2fad9b1SAman Mittal    <View style={styles.container}>
47*f2fad9b1SAman Mittal      /* @info This used to say, "Open up App.js to start working on your app!". Now it's "Hello world!". */<Text>Hello world!</Text>/* @end */
48*f2fad9b1SAman Mittal    </View>
49*f2fad9b1SAman Mittal  );
50*f2fad9b1SAman Mittal}
51*f2fad9b1SAman Mittal
52*f2fad9b1SAman Mittalconst styles = StyleSheet.create({
53*f2fad9b1SAman Mittal  container: {
54*f2fad9b1SAman Mittal    flex: 1,
55*f2fad9b1SAman Mittal    backgroundColor: '#fff',
56*f2fad9b1SAman Mittal    alignItems: 'center',
57*f2fad9b1SAman Mittal    justifyContent: 'center',
58*f2fad9b1SAman Mittal  },
59*f2fad9b1SAman Mittal});
60*f2fad9b1SAman Mittal```
61*f2fad9b1SAman Mittal
62*f2fad9b1SAman Mittal</SnackInline>
63*f2fad9b1SAman Mittal
64*f2fad9b1SAman Mittal> **Wait, what is this "Open in Snack" button?**
65*f2fad9b1SAman Mittal>
66*f2fad9b1SAman Mittal> Snack is a web-based editor that works similarly to an Expo project. It's a great way to share code snippets and experiment without downloading any tools on your computer.
67*f2fad9b1SAman Mittal>
68*f2fad9b1SAman Mittal> Go ahead, press the above button. You will see the above code running in a Snack. Try to switch between iOS, Android, or the web tabs. You can also open it on your device in the Expo Go app from the **My device** tab.
69*f2fad9b1SAman Mittal>
70*f2fad9b1SAman Mittal> Throughout this tutorial, use Snack to copy and paste the code into your own project on your computer. We will continue to provide Snacks for each module, but **we recommend you create the app on your machine to go through the experience of building the app**.
71*f2fad9b1SAman Mittal
72*f2fad9b1SAman Mittal## Up next
73*f2fad9b1SAman Mittal
74*f2fad9b1SAman MittalIf you're already familiar with Expo, feel free to jump ahead to specific chapters. However, if you'd like to start from scratch, continue to the next chapter in which we will learn [how to create your first app with Expo](/tutorial/create-your-first-app/).
75