1 00:00:02,200 --> 00:00:04,510 So now that have we learned about all these alternatives, 2 00:00:04,510 --> 00:00:09,860 the obvious question is, which approach should you use for your application? 3 00:00:09,860 --> 00:00:15,250 Now I think throughout the course, you saw that using expo in general is an awesome development experience, 4 00:00:15,260 --> 00:00:21,000 everything is super fast, it's easy to test changes both on simulators and real devices. 5 00:00:21,050 --> 00:00:22,940 You don't need to build locally, 6 00:00:22,960 --> 00:00:29,990 therefore you can also build and test for and on iOS, on Windows systems and Linux which is not possible 7 00:00:30,170 --> 00:00:32,050 without the managed workflow 8 00:00:32,390 --> 00:00:34,150 and that's all pretty cool. 9 00:00:34,370 --> 00:00:39,950 But when we compare expo to non-expo setups and with non-expo, I mean both creating it with React 10 00:00:39,950 --> 00:00:43,610 Native CLI or using a bare expo workflow, 11 00:00:43,610 --> 00:00:45,760 then of course we have to compare all the things. 12 00:00:45,770 --> 00:00:52,760 So as mentioned with expo, with the managed workflow, it's easy to use that, easy to develop, non-expo 13 00:00:52,820 --> 00:00:55,970 means more manual setup and so on. 14 00:00:55,970 --> 00:01:01,310 Now you also will have an easy time deploying your app as you will also see in the deployment section 15 00:01:01,700 --> 00:01:06,260 and you can even build and deploy for iOS if you're on the Windows or Linux machine, something which 16 00:01:06,260 --> 00:01:09,500 is not possible without the managed workflow. 17 00:01:09,860 --> 00:01:15,590 So there, you have some restrictions there and deployment as you will see also takes more manual work, 18 00:01:15,710 --> 00:01:23,520 like the non-expo workflow does in general. When in the expo managed workflow world, we also have a rich 19 00:01:23,520 --> 00:01:25,200 suit of native modules, 20 00:01:25,260 --> 00:01:32,760 so all these expo APIs which are always easy to use, just an expo installed away, don't need any 21 00:01:32,760 --> 00:01:33,200 setup 22 00:01:33,210 --> 00:01:38,070 so that's really amazing and you got pretty much everything you could want in a native app there - 23 00:01:38,070 --> 00:01:41,440 camera, location, filesystem, it's all there. 24 00:01:41,910 --> 00:01:46,440 If you sometimes need something which is not supported though or you need to write your own native code 25 00:01:46,470 --> 00:01:52,560 that you want to connect to React Native, your own package or whatever it is, then non-expo is the solution. 26 00:01:52,560 --> 00:01:59,700 So there you can use any native code but of course, you need to set it up manually and that might be 27 00:01:59,700 --> 00:02:07,140 easy with React Native link as you saw or even some autolinking libraries but you might also have libraries 28 00:02:07,140 --> 00:02:09,060 that take more effort. 29 00:02:09,060 --> 00:02:14,820 In addition, it's worth noting that of course third-party libraries need to be maintained to stay up 30 00:02:14,820 --> 00:02:20,850 to date with React Native and newer versions of React Native but also they need to stay up to date with 31 00:02:20,940 --> 00:02:22,160 Android and iOS, 32 00:02:22,170 --> 00:02:22,440 right, 33 00:02:22,440 --> 00:02:27,740 because these platforms also evolve and introduce new features or deprecate old features. 34 00:02:27,930 --> 00:02:34,410 The expo APIs are pretty guaranteed to be maintained because the expo team is active, is working 35 00:02:34,410 --> 00:02:37,710 on that and it's a whole ecosystem that works together. 36 00:02:37,950 --> 00:02:40,740 That might not be true for all third-party packages, 37 00:02:40,740 --> 00:02:45,840 so this extra security you get with the expo packages is definitely pretty nice. 38 00:02:45,840 --> 00:02:52,920 That being said as you saw with the bare workflow, you can of course also add certain but not all expo 39 00:02:52,920 --> 00:02:55,160 APIs to non-managed apps, 40 00:02:55,170 --> 00:03:02,910 that is possible but takes a bit more work. Now of course the managed workflow has downsides, 41 00:03:02,910 --> 00:03:07,600 it's a wrapper around your app and that of course impacts both the size and performance, 42 00:03:07,710 --> 00:03:14,640 most likely not in a way that you will feel or see but it's worth noting, there is a thin extra wrapper 43 00:03:14,840 --> 00:03:19,610 and you don't have that in the bare workflow or when just working with the React Native CLI 44 00:03:20,520 --> 00:03:24,000 and of course as mentioned, you're restricted to the built-in native modules. 45 00:03:24,000 --> 00:03:27,700 There are a bunch of those and probably everything you might ever need 46 00:03:28,200 --> 00:03:31,580 but if you need something else which is not built into expo, 47 00:03:31,620 --> 00:03:36,390 so an API which is not supported by expo, then there is no way to get it to work, 48 00:03:36,390 --> 00:03:39,710 then you need to eject because only non-expo 49 00:03:39,720 --> 00:03:46,790 and with that I mean non-managed workflow apps support all third-party packages and all native modules 50 00:03:46,800 --> 00:03:48,550 you might want to use. 51 00:03:48,780 --> 00:03:54,000 So therefore my suggestion would be that for most apps, pretty much all apps probably, 52 00:03:54,000 --> 00:04:00,690 you work with expo because of the great development experience and the great flexibility you have there. 53 00:04:00,690 --> 00:04:07,230 Since you can always eject, there there's not much to lose, you can always go back to a non-expo managed 54 00:04:07,230 --> 00:04:08,340 app if you want to 55 00:04:08,370 --> 00:04:12,340 as you saw, starting with such a non-expo app, 56 00:04:12,360 --> 00:04:17,180 so with a bare app or even with just a React Native CLI app is a good idea 57 00:04:17,190 --> 00:04:23,460 if you know that you will need a lot of native functionalities that are not supported by expo or if 58 00:04:23,460 --> 00:04:29,460 you're building a high performance application where every kilobytes of extra wrapping matters, 59 00:04:29,460 --> 00:04:35,820 then of course you might start with such an app but otherwise I really see no strong reason for why not 60 00:04:35,820 --> 00:04:37,000 to use expo 61 00:04:37,290 --> 00:04:42,120 and especially if you're not working in a huge team, in a corporation or anything like that, 62 00:04:42,330 --> 00:04:46,860 being able to build iOS apps on Windows too is really a nice thing, 63 00:04:46,860 --> 00:04:54,420 so that alone is also good reason for staying in the managed world. So that are my two cents on that, 64 00:04:54,420 --> 00:04:55,890 since you can eject, 65 00:04:55,890 --> 00:04:58,490 it's not like you have to stick with one solution 66 00:04:58,500 --> 00:05:05,700 if you start with it, just going back from the bare or the React Native CLI only setup to the managed 67 00:05:05,700 --> 00:05:11,250 workflow is a bit more tricky because there, you need to create a new expo managed project, 68 00:05:11,250 --> 00:05:18,330 copy over your code and if you did use any third-party libraries that are not from expo, you won't be 69 00:05:18,330 --> 00:05:19,280 able to use them anymore. 70 00:05:19,290 --> 00:05:21,450 So switching back can be hard, 71 00:05:21,450 --> 00:05:26,610 switching from expo managed to expo non-managed, that is pretty easy with ejecting.