2021-02-02 23:16:28 +00:00
|
|
|
# react-native
|
|
|
|
|
|
|
|
> A framework for building native apps with React.
|
|
|
|
> More information: <https://reactnative.dev>.
|
|
|
|
|
|
|
|
- Initialize a new React Native project in a directory of the same name:
|
|
|
|
|
|
|
|
`react-native init {{project_name}}`
|
|
|
|
|
|
|
|
- Start the metro bundler:
|
|
|
|
|
|
|
|
`react-native start`
|
|
|
|
|
|
|
|
- Start the metro bundler with a clean cache:
|
|
|
|
|
|
|
|
`react-native start --reset-cache`
|
|
|
|
|
|
|
|
- Build the current application and start it on a connected Android device or emulator:
|
|
|
|
|
|
|
|
`react-native run-android`
|
|
|
|
|
|
|
|
- Build the current application and start it on an iOS simulator:
|
|
|
|
|
|
|
|
`react-native run-ios`
|
|
|
|
|
|
|
|
- Build the current application in `release` mode and start it on a connected Android device or emulator:
|
|
|
|
|
|
|
|
`react-native run-android --variant={{release}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Start `logkitty` and print logs to `stdout`:
|
2021-02-02 23:16:28 +00:00
|
|
|
|
|
|
|
`react-native log-android`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Start `tail system.log` for an iOS simulator and print logs to `stdout`:
|
2021-02-02 23:16:28 +00:00
|
|
|
|
|
|
|
`react-native log-ios`
|