1 00:00:02,410 --> 00:00:05,770 You could say there are around three ways of building a React Native app - 2 00:00:05,770 --> 00:00:09,420 one is with expo with the so-called managed workflow, 3 00:00:09,430 --> 00:00:14,920 that's the approach we used in the course and this has kind of a dashed line around it because this 4 00:00:14,920 --> 00:00:20,290 is not really an alternative for building a non-expo app, this of course heavily embraces expo instead, 5 00:00:20,440 --> 00:00:21,440 it is the approach we use 6 00:00:21,450 --> 00:00:27,190 in the course. It is easy to use, has pretty much zero setup, it works out of the box, you can easily test the 7 00:00:27,190 --> 00:00:33,250 app on a real device, you got lots of native modules built in which are super easy to install and to use. 8 00:00:33,730 --> 00:00:39,610 It's controlled with the expo CLI, you just type npm start or expo start, you've got the expo 9 00:00:39,610 --> 00:00:46,710 dev tools in the browser, it's easy to run on simulators and real devices and you still can get a standalone 10 00:00:46,720 --> 00:00:53,080 app which you can deploy, which as I explained contains the expo client as a wrapper so to say. Since you 11 00:00:53,080 --> 00:00:58,510 can also easily test it on real devices, you technically don't even need to install Android Studio or 12 00:00:58,600 --> 00:01:05,530 Xcode to build an app with expo. I did install it and I kind of instructed you to also install it for 13 00:01:05,630 --> 00:01:11,320 this course so that we could spin up simulators and test it there because I didn't constantly want to 14 00:01:11,320 --> 00:01:16,990 test it on a real device and record that screen but you don't need to do that, you can test it on 15 00:01:16,990 --> 00:01:20,360 a real device with the expo client app installed there only, 16 00:01:20,410 --> 00:01:23,120 so that's something you can do. Now 17 00:01:23,200 --> 00:01:28,810 this is the approach we used but of course this is then an expo heavy app, it's an app fully in the expo 18 00:01:28,840 --> 00:01:33,590 ecosystem with all the restrictions or disadvantages I outlined. 19 00:01:33,640 --> 00:01:39,610 Now an alternative to that is that you still use expo but the so-called bare workflow or that you 20 00:01:39,610 --> 00:01:44,380 build a React Native app without expo at all with the React Native CLI. 21 00:01:44,610 --> 00:01:51,720 Now the expo bare workflow thing can either be created from scratch or by ejecting from the managed workflow 22 00:01:51,720 --> 00:01:55,080 and that's something I'll also show you in this module. 23 00:01:55,110 --> 00:02:01,530 Now when you build an app with the bare workflow, you get a non-expo app, you build a native app as you 24 00:02:01,530 --> 00:02:03,490 would build it with the React Native CLI, 25 00:02:03,520 --> 00:02:05,950 so you get the same basis there, 26 00:02:05,970 --> 00:02:13,920 the difference is that you can still use special expo packages. Installing them is a bit more complex 27 00:02:13,920 --> 00:02:20,040 than when you're in the managed workflow, you need to do more manual wire up work, at least for some 28 00:02:20,040 --> 00:02:27,330 packages but many, not all but many of the expo packages which are included in the managed workflow are 29 00:02:27,420 --> 00:02:32,560 available as standalone packages you can bring to any React Native app as well 30 00:02:32,640 --> 00:02:38,480 and the expo team is working on making more and more packages available outside of the managed workflow. 31 00:02:38,970 --> 00:02:45,450 So you can bring that and with the bare workflow, it's relatively easy to add these packages, not as easy 32 00:02:45,450 --> 00:02:50,870 and quick as in the manage workflow but still, very easy. When building an app without expo at all, with 33 00:02:50,890 --> 00:02:51,900 the React Native CLI, 34 00:02:51,930 --> 00:02:58,420 you can still bring these packages but then more manual setup is required. Now as I said, it's relatively 35 00:02:58,420 --> 00:03:01,660 easy to configure and manage in the bare workflow, 36 00:03:01,660 --> 00:03:04,610 you have to manage more in the React Native CLI workflow, 37 00:03:04,630 --> 00:03:12,790 so there you really build everything without any support by expo. Regarding the native modules you use, 38 00:03:13,480 --> 00:03:19,540 you can use any native module you want, also non-expo ones, you can bring these special expo packages 39 00:03:19,540 --> 00:03:23,620 which you need to wire up manually but you can bring any other native module. 40 00:03:23,620 --> 00:03:28,480 Now when we come to building the app and distributing it, with the managed workflow you will see in the 41 00:03:28,480 --> 00:03:35,650 deployment module that's super easy to do, with the bare workflow it's a bit "harder" in quotes, it 42 00:03:35,650 --> 00:03:42,700 requires more work with Android Studio and Xcode and it's not as easy as with the expo managed workflow, 43 00:03:42,940 --> 00:03:48,670 you also for example and that's one important restriction, you will not be able to build iOS apps on 44 00:03:48,670 --> 00:03:49,520 Windows. 45 00:03:49,660 --> 00:03:54,910 That is possible in the managed workflow because the build won't happen on your machine 46 00:03:54,910 --> 00:04:00,160 there but in the cloud, with the bare workflow and with the React Native CLI, you are responsible 47 00:04:00,160 --> 00:04:05,260 for building the apps and therefore, you need to do it locally on your machine and therefore due to Apple's 48 00:04:05,260 --> 00:04:10,320 restrictions, you will not be able to build an iOS app on Windows or Linux, 49 00:04:10,330 --> 00:04:12,630 so that's one thing to keep in mind there as well. 50 00:04:12,670 --> 00:04:14,820 So you do it all on your own there, 51 00:04:14,950 --> 00:04:20,320 so you need these tools installed and whilst you won't use them to write code, you will need to fiddle 52 00:04:20,320 --> 00:04:27,360 around in them a bit and you will use them to then build your app and deploy it at the end. These are 53 00:04:27,360 --> 00:04:29,830 the alternatives. Now for deployment, 54 00:04:29,830 --> 00:04:35,050 I'll have a separate module where I have a look at how that works with the managed workflow and also 55 00:04:35,050 --> 00:04:36,700 without the managed workflow, 56 00:04:36,820 --> 00:04:39,820 so that's not something I'll focus on in this module, 57 00:04:39,820 --> 00:04:45,130 instead in this module I want to show you how you build an app with the React Native CLI, how you also 58 00:04:45,140 --> 00:04:50,350 build it with expo in the bare workflow and how you can eject from the managed workflow to the bare 59 00:04:50,350 --> 00:04:51,280 workflow. 60 00:04:51,280 --> 00:04:56,560 We'll also have a look at how you can add some native device features in these two alternatives because 61 00:04:56,590 --> 00:05:00,390 that is the part where it mostly differs from the managed workflow. 62 00:05:00,540 --> 00:05:05,130 The way you write your components and so on and which components you use from React Native, 63 00:05:05,130 --> 00:05:10,710 that does not differ at all because there was nothing specific about expo in that. Put it in other words 64 00:05:10,710 --> 00:05:14,370 if we have a look at the project we worked on earlier in the course, 65 00:05:14,370 --> 00:05:20,100 this native module project, essentially what you'll lose when you're not using the managed workflow 66 00:05:20,460 --> 00:05:24,960 is all the expo related imports, everything you're importing from expo, 67 00:05:25,080 --> 00:05:31,290 that basically is something which now is harder or which you now need to do differently. 68 00:05:31,290 --> 00:05:36,540 If you're not using expo like in this file, such a file would not need to change at all, 69 00:05:36,540 --> 00:05:42,120 only files where you use something from expo need to be adjusted or need to be implemented differently 70 00:05:42,240 --> 00:05:48,190 when not using the managed workflow or to be precise, you might not be able to use certain packages anymore 71 00:05:48,270 --> 00:05:52,810 or you can still use them and you probably don't even need to touch your code at all 72 00:05:52,920 --> 00:05:58,020 but in order to use them you need to do more manual setup work than you need to do with expo and the 73 00:05:58,020 --> 00:05:58,910 managed workflow.