You should see your new app running in the iOS Simulator shortly. Open a new terminal inside your React Native project folder. Let Metro Bundler run in its own terminal. To start Metro, run npx react-native start inside your React Native project folder: To run our react-native application we need to start Metro the JavaScript bundler that ships with React Native. To create a new react-native project run the below command: With npx react-native, the current stable version of the CLI will be downloaded and executed at the time the command is run.
Rather than install and manage a specific version of the CLI globally, we recommend you access the current version at runtime using npx, which ships with Node.js. React Native has a built-in command-line interface. You can use React Native’s built-in command-line interface to generate a new project. So you can install it by running below commandĭon’t need to install react-native-cli package. Watchman is a tool by facebook for watching changes in the filesystem. Or you can install node using brew by running the below command. If you have already installed Node on your system, make sure it is Node 12 or newer. Go to the node website download the latest version of the node and install it. To setup, homebrew follow the below commandĮnter fullscreen mode Exit fullscreen mode go to get the info section and select open using rosetta. For this just go to Applications and create a duplicate terminal.
You can install Rosetta 2 on the Mac M1 by using the familiar softwareupdate command-line tool.Īfter Setting up Rosetta we will create Rosetta Terminal. Curiously, Rosetta 2 is not installed by default on these Macs, however, so if you wish to run these apps you’ll need to install Rosetta 2 onto the Apple Silicon Mac yourself. Rosetta 2 is necessary if you want to be able to run older non-native Intel x86 apps on new Apple Silicon Macs, like the M1 MacBook Pro, MacBook Air, or Mac mini. Xcode comes bundled with emulators for the latest versions of iPhone and iPad.
Some of the basic software which is required to be installed on your m1 system are: A separate emulator application opens to display the app: Only one emulator may run at a time, so if you want to test the app in a different emulator, you need to quit the emulator application and run a different target within Xcode. (Subscribe to my youtube channel for JavaScript Videos: )Īfter reading this blog you will end up setting up react-native in M1. In this article, I will give you a quick guide to setup up the react-native environment on your Mac M1, its slightly challenging as not much support and community help is available.