Looking for an up-to-date RN CLI tutorial

I know that Expo is the preffered way and easier to setup and update your app on app stores when already published, but I would like to also like to learn the React Native CLI way of doing things without Expo. Do you know about any good tutorial that is up-to-day (will work on macOS M1) with some hello world or to-do app?
17 Replies
shiroyasha9
shiroyasha9•15mo ago
CLI is a huge pain in the ass, but if you want to learn it, the best way is to follow the official docs - https://reactnative.dev/docs/environment-setup If you want to see a good hello world project built using CLI, I would recommend you check my repository - https://github.com/shiroyasha9/shopping-cart This was a shopping cart application that I was asked to create for an interview task. Ping me if you face any difficulties, and be sure to go through the commits to see the workflow. I use M1 as well, so I'll try to help you as much as I can.
Setting up the development environment · React Native
This page will help you install and build your first React Native app.
GitHub
GitHub - shiroyasha9/shopping-cart
Contribute to shiroyasha9/shopping-cart development by creating an account on GitHub.
Deras
DerasOP•15mo ago
Thanks, do you think it's just better to start with Flutter?
shaaah
shaaah•15mo ago
@shiroyasha9 They haven't improved the CLI? Would you recommend going with Expo then?
shiroyasha9
shiroyasha9•15mo ago
I wouldn't suggest using Flutter, especially if you are familiar with the react world. Learning an entirely new paradigm is just a pain, and the video which Theo made on it (https://youtu.be/tTGWfXPKxf4?si=_xhkFut-1M8cZ3fk), really does summarize my sentiments for it. What I do suggest is that if your application is not going to do heavy native specific stuff, like accessing the cameras, or sensors, etc - it is better to go with a web app. You get to use all the web stuff that you know and love, and you app can reach wider audiences easily.
Theo - t3․gg
YouTube
My Final Flutter Video
I'm genuinely so tired of Flutter. Every time it comes up, I feel like I'm going insane. I'm still waiting to have a good experience in a Flutter app. Until then, I'll be sticking with React Native. Please be kind in the comments. I'm sorry for my harshness in this video, I just want to be done once and for all. ALL MY VIDEOS ARE POSTED EARLY ...
shiroyasha9
shiroyasha9•15mo ago
In my opinion, Expo is indeed the best way to get started with a RN application. They provide incredible tooling that makes setting up the project really easy. The wide array of packages that they provide for extending functionality of your app are what makes it a game changer (https://github.com/expo/expo/tree/main/packages). They help you add advanced native functionalities really easily. Technologies like Clerk (authentication) also seem to support only Expo at the moment, and not the CLI, so that is another factor that should be considered.
m$
m$•15mo ago
dont see any other option these days TBH worst scenario you have to write your own native modules if they arent compatible with expo
Ramsay
Ramsay•15mo ago
Every rn native module is compatible with expo. Expo is just react native + extra tools.
shaaah
shaaah•15mo ago
Oh is it? Interesting Because I feel I'v seen different packages for firebase and navigation for CLI and Expo, I could be wrong
m$
m$•15mo ago
No they arent, take mapbox for example. You have to eject from expo and use EAS
shaaah
shaaah•15mo ago
Do you guys have any thoughts on https://tamagui.dev/ ?
Tamagui
Tamagui — React Native + Web UI kit
Write less, run faster. Styles, optimizing compiler & UI kit that unify React Native + Web.
m$
m$•15mo ago
React native paper + stylesheet.create({}) is all you need 😀
Ramsay
Ramsay•15mo ago
People just have a misunderstanding of Expo due to it's past. "Ejecting" is not a thing anymore. https://docs.expo.dev/faq/#is-expo-eject-deprecated. In Expo you have the "managed" workflow and the "bare" workflow. The "managed" workflow is where expo handles the generation of your native files for you. So packages that have changes to native code require you to create a config plugin to stay in the managed workflow. Otherwise, you can just handle the native code changes yourself and use any library you want. This is the "bare" worfklow and this is what I mean when I say that every native module is compatible with expo. When people say that a library is not "compatible" with expo, or that you have to "eject", they usually mean that is does not work with Expo Go, which is a development client that you can use with Expo that you don't have to use. It's just there for convenience.
Expo Documentation
FAQ
A list of common questions and limitations about Expo and related services.
Ramsay
Ramsay•15mo ago
GitHub
maps/plugin/install.md at main · rnmapbox/maps
A Mapbox react native module for creating custom maps - rnmapbox/maps
Ramsay
Ramsay•15mo ago
I think it looks great but it has too much config imo. It took me so long to set up I just gave up. I want component libraries for convenience lol. I just make my own components with stylesheet
m$
m$•15mo ago
Good response, thank you for the detailed info - you are right. Just from past experience people have just referred to it as 'ejecting' where that is not correct anymore (myself included)
shaaah
shaaah•15mo ago
yea but what approach do you go with when you have to do Web + Mobile? Because tamagui seems to be solving that particular issue
Ramsay
Ramsay•15mo ago
I would probably only use tamagui for web + mobile. Never have made a cross platform app yet. I prefer to just make two separate apps.
Want results from more Discord servers?
Add your server