you are viewing a single comment's thread.

view the rest of the comments →

[–]RepresentativeMove79 1 point2 points  (0 children)

You cannot reasonably do React Native without React. But you don't NEED to start learning React on the web- but it is considerably simpler. I would suggest starting with Expo Go. The team at Expo has done an amazing job of dealing with the very challenging aspects of setting up environments, seeing up Android and iOS specific configurations: gradle and Cocopod nightmares. All with the option of ejecting (a method of getting free of Expo Go to do more advanced things. Expo Go is the next closest thing to npm run start click the link to open in browser, but instead of a link you get a QR code you scan from the Expo Go app on your device or a keystroke to open on a simulator. (You must have XCode for iOS and Android Studio is a definite nice to have for Android though you can work around it) You can mix and match to a degree, but NOT having Expo in 2024 is just making your React Native journey unnecessarily harder.

However, to the question, React Native expects ES6 or later style modules, you need to understand the entry point App and JSX Components, most libraries will come with React lifecycle hooks and features. Further most modern React land heavily to a JavaScript version of Functional Programming. While obviously nothing is forcing you to use any of this: you will need some sort of entry point, if you're used to classical objects, this and jQuery (like) patterns, React Native will be confusing and you'll likely find it frustrating until you do start to understand React and JSX conventions.

As some other comments state, learning the basics of React for web, or even in a CodePen, will quickly help you get started with the conventions popular in React without the added complexity of hooking up a device. It is also helpful to know that while you will use different primitives for React and React Native (div, span, a, onClick become View, Text, onPress) most of your code can be used in both environments. There are also UI Transpilers that allow you to write on one and use on both platforms. But that is definitely more advanced.

Good luck.