Run the following command to create a Project on your computer -
create-react-native-app AwesomeProject
Let's assume your current directory is Desktop. So the above command will create a Folder AwesomeProject on your desktop. After installation change your current directory to AwesomeProject Folder. Now run -
npm start
This will print QR Code on your console and start the server.
After that install Expo
App on your Android device. After that turn your mobile hotspot on and connect your computer with that hotspot. Now open Expo app and scan QR code. Now your Expo app automatically fetch all the project data from your computer and run the app.
Now open up App.js in the project directory AwesomeProject
and make some changes, the changes will be pushed automatically to your mobile device and refresh the page.
To define style for the component use the following syntax -
const styles = Stylesheet.Create({ class1 : { }, class2 : { } });
Now you can attach these classes to the component using style
attribute.