Good question ЁЯСН
The Metro bundler is the JavaScript packager that React Native uses. It must be running in the background for your app to load JS code.
ЁЯЪА How to start Metro bundler
-
Go to your React Native project root (where
package.jsonis). -
Start Metro:
-
By default, Metro will run on port 8081.
-
Leave this terminal window open.
-
-
In another terminal, build & install the app:
or
ЁЯМР For wireless debugging
If you’re not using USB, run Metro with your laptop’s IP address:
Then configure your phone (Dev Settings → Debug server host & port) with:
⚡ Pro tip: If you already ran npx react-native run-android, Metro usually auto-starts in another tab. But if you closed it, just re-run npx react-native start.
Do you want me to also show you how to make Metro auto-restart whenever you run run-android, so you don’t have to open it manually each time?
No comments:
Post a Comment