snippetbashTip
react-native — A framework for building native apps with React. More information: <https://github.com/react-native-
Viewed 0 times
commandreact-nativebuildingappsframeworknativeclifor
Problem
How to use the
react-native command: A framework for building native apps with React. More information: <https://github.com/react-native-community/cli/blob/main/docs/commands.md>.Solution
react-native — A framework for building native apps with React. More information: <https://github.com/react-native-community/cli/blob/main/docs/commands.md>.Initialize a new React Native project in a directory of the same name:
react-native init {{project_name}}Start the metro bundler:
react-native startStart the metro bundler with a clean cache:
react-native start --reset-cacheBuild the current application and start it on a connected Android device or emulator:
react-native run-androidBuild the current application and start it on an iOS simulator:
react-native run-iosBuild the current application in
release mode and start it on a connected Android device or emulator:react-native run-android --variant={{release}}Start
logkitty and print logs to stdout:react-native log-androidStart
tail system.log for an iOS simulator and print logs to stdout:react-native log-iosCode Snippets
Initialize a new React Native project in a directory of the same name
react-native init {{project_name}}Start the metro bundler
react-native startStart the metro bundler with a clean cache
react-native start --reset-cacheBuild the current application and start it on a connected Android device or emulator
react-native run-androidBuild the current application and start it on an iOS simulator
react-native run-iosContext
tldr-pages: common/react-native
Revisions (0)
No revisions yet.