xref: /expo/docs/pages/tutorial/introduction.mdx (revision 9de0c686)
1f2fad9b1SAman Mittal---
2*9de0c686SAman Mittaltitle: 'Tutorial: Introduction'
3*9de0c686SAman Mittalsidebar_title: Introduction
4f2fad9b1SAman Mittal---
5f2fad9b1SAman Mittal
6f2fad9b1SAman Mittalimport Highlight from '~/components/plugins/Highlight';
7f2fad9b1SAman Mittalimport { SnackInline } from '~/ui/components/Snippet';
8f2fad9b1SAman Mittalimport Video from '~/components/plugins/Video';
9*9de0c686SAman Mittalimport { BoxLink } from '~/ui/components/BoxLink';
10*9de0c686SAman Mittalimport { BookOpen02Icon } from '@expo/styleguide-icons';
11f2fad9b1SAman Mittal
12f2fad9b1SAman 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!
13f2fad9b1SAman Mittal
14f2fad9b1SAman Mittal## About this tutorial
15f2fad9b1SAman Mittal
16f2fad9b1SAman MittalThe objective of this tutorial is to get started with Expo and become familiar with the Expo SDK. It'll cover the following topics:
17f2fad9b1SAman Mittal
18f2fad9b1SAman Mittal- Create an Expo App
19f2fad9b1SAman Mittal- Break down the app layout and implement it with flexbox
20f2fad9b1SAman Mittal- Use each platform's system UI to select an image from the media library
21f2fad9b1SAman Mittal- Create a sticker modal using the `<Modal>` and `<FlatList>` components from React Native
22f2fad9b1SAman Mittal- Add touch gestures to interact with a sticker
23f2fad9b1SAman Mittal- Use third-party libraries to capture a screenshot and save it to the disk
24f2fad9b1SAman Mittal- Handle platform differences between Android, iOS, and web
25f2fad9b1SAman Mittal- Finally, go through the process of configuring a status bar, a splash screen, and an icon to complete the app
26f2fad9b1SAman Mittal
27f2fad9b1SAman 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.
28f2fad9b1SAman Mittal
29f2fad9b1SAman 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.
30f2fad9b1SAman Mittal
31f2fad9b1SAman 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:
32f2fad9b1SAman Mittal
33f2fad9b1SAman Mittal<Video file="tutorial/final.mp4" />
34f2fad9b1SAman Mittal
35f2fad9b1SAman Mittal## How to use this tutorial
36f2fad9b1SAman Mittal
37f2fad9b1SAman 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.
38f2fad9b1SAman Mittal
39f2fad9b1SAman 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:
40f2fad9b1SAman Mittal
41f2fad9b1SAman Mittal<SnackInline label="Hello world">
42f2fad9b1SAman Mittal
43f2fad9b1SAman Mittal{/* prettier-ignore */}
44f2fad9b1SAman Mittal```jsx
45f2fad9b1SAman Mittalimport { StyleSheet, Text, View } from 'react-native';
46f2fad9b1SAman Mittal
47f2fad9b1SAman Mittalexport default function App() {
48f2fad9b1SAman Mittal  return (
49f2fad9b1SAman Mittal    <View style={styles.container}>
50f2fad9b1SAman 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 */
51f2fad9b1SAman Mittal    </View>
52f2fad9b1SAman Mittal  );
53f2fad9b1SAman Mittal}
54f2fad9b1SAman Mittal
55f2fad9b1SAman Mittalconst styles = StyleSheet.create({
56f2fad9b1SAman Mittal  container: {
57f2fad9b1SAman Mittal    flex: 1,
58f2fad9b1SAman Mittal    backgroundColor: '#fff',
59f2fad9b1SAman Mittal    alignItems: 'center',
60f2fad9b1SAman Mittal    justifyContent: 'center',
61f2fad9b1SAman Mittal  },
62f2fad9b1SAman Mittal});
63f2fad9b1SAman Mittal```
64f2fad9b1SAman Mittal
65f2fad9b1SAman Mittal</SnackInline>
66f2fad9b1SAman Mittal
67f2fad9b1SAman Mittal> **Wait, what is this "Open in Snack" button?**
68f2fad9b1SAman Mittal>
69*9de0c686SAman Mittal> Snack is a web-based editor that works similarly to an Expo project. It's a great way to share code snippets and experiments without downloading any tools on your computer.
70f2fad9b1SAman Mittal>
71*9de0c686SAman Mittal> Go ahead and 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.
72f2fad9b1SAman Mittal>
73*9de0c686SAman Mittal> Throughout this tutorial, use Snack to copy and paste the code into your 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**.
74f2fad9b1SAman Mittal
75*9de0c686SAman Mittal## Next step
76f2fad9b1SAman Mittal
77*9de0c686SAman Mittal<BoxLink
78*9de0c686SAman Mittal  title="Create your first app with"
79*9de0c686SAman Mittal  Icon={BookOpen02Icon}
80*9de0c686SAman Mittal  description="If 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."
81*9de0c686SAman Mittal  href="/tutorial/create-your-first-app"
82*9de0c686SAman Mittal/>
83