When should I run `react-native start`?

前端 未结 3 1834
[愿得一人]
[愿得一人] 2020-12-30 00:11

Just getting started with React-Native (for the non-CRNA/Expo case) and it\'s not clear to me after reading the react-native docs or Understanding the CLI when it\'s appropr

相关标签:
3条回答
  • 2020-12-30 00:31

    react-native start is same as npm start and like you said it's to start the react packager/server.

    I have found myself in situations where I had to stop and start the server explicitly using npm start.

    To start up a project, you use the react-native run-ios and it starts up both the simulator and the server but in cases where the app has been installed and you want to restart the server, you can stop it explicitly in the terminal and use react-native start or npm start to start it up again.

    0 讨论(0)
  • 2020-12-30 00:38

    Using react-native start when app already installed on device. Using react-native run-ios when we need to install app on device and start the server. But when we installed new package to our project, we need to restart server using react-native run-ios.

    0 讨论(0)
  • 2020-12-30 00:44

    Personally i use react-native run-android only once at the start of the blank applicaction, and also i run it everytime that i add a component that requires linking.

    I use react-native start when i am editing the code, i combine it with the DevSettings /Debug server host & port for device where i set my pc_ip:8081 and that way i can update code on the fly without having to connect my real device to the pc .

    0 讨论(0)
提交回复
热议问题