skip to content

Project Setup

Starting an app with a framework or the community CLI, installing Xcode and Android toolchains, and configuring TypeScript, build variants and upgrades. Interviewers use it to spot real experience.

part ofReact Nativeoverview, primer and where to startread it →
on this pageshow

explore

questions

23

In a bare React Native iOS project, what does pod install do, and why must you open the .xcworkspace afterwards?

level: juniorimportance: must knowfreq 62%

basics

~20 s

pod install reads ios/Podfile, resolves React Native's pods and every native library's pods, writes Podfile.lock and generates a Pods project plus an .xcworkspace that joins it to the app project, so Xcode must build the workspace.

open as a page

In a React Native app, why is process.env.API_URL undefined at runtime, and how do per-environment values actually reach the JavaScript?

level: middleimportance: must knowfreq 58%

basics

~20 s

React Native's JavaScript runs on the device with no Node process, so process.env holds only NODE_ENV. Per-environment values must be inlined into the bundle at build time or read from native build config, and both are readable in the shipped app.

open as a page

In a React Native TypeScript app, what turns .tsx into JavaScript for Metro, and why can the app run with type errors?

level: middleimportance: must knowfreq 55%

basics

~10 s

Metro compiles .ts and .tsx with Babel, where @react-native/babel-preset's TypeScript plugin deletes type annotations without checking them. Type errors are only reported by tsc, which @react-native/typescript-config runs as a noEmit checker.

open as a page

How do you upgrade a bare React Native app to a new version, and what does the Upgrade Helper give you?

level: middleimportance: must knowfreq 58%

basics

~20 s

Bump react-native and react to the versions the Upgrade Helper's package.json shows, then hand-apply its diff of the project template to the iOS, Android and JavaScript config files, update native libraries, reinstall pods and rebuild both platforms.

open as a page

In React Native, what does the global __DEV__ flag tell you, and why is it the wrong switch for staging versus production APIs?

level: juniorimportance: should knowfreq 42%

basics

~20 s

DEV is true only when the JavaScript bundle was built in development mode and false in any release bundle. It says nothing about the backend: a staging build installed by testers is a release build, so it sees false exactly like production.

open as a page

How do you create a React Native app without a framework in 2026, and what happened to the old react-native init command?

level: juniorimportance: should knowfreq 45%

basics

~10 s

Run npx @react-native-community/cli@latest init MyApp, optionally with --version to pin a React Native release or --template for a custom template. The old react-native init was deprecated in 0.75 and stopped working in 0.77.

open as a page

In a bare React Native project, what does npm run ios or npm run android do, and how do you pick an iOS simulator?

level: juniorimportance: should knowfreq 46%

basics

~20 s

The scripts call the React Native CLI's run-ios or run-android, which builds the native app with Xcode or the Gradle wrapper, installs it on a simulator, emulator or device, and launches it; a debug build then loads its JavaScript from Metro.

open as a page

Why does a new React Native app's tsconfig.json just extend @react-native/typescript-config, and what does that base config give you?

level: juniorimportance: should knowfreq 38%

basics

~20 s

The base config encodes React Native's type-checking setup: strict checks, noEmit, JSX kept as react-native, bundler-style resolution with the react-native export condition Metro uses, Jest types and skipLibCheck. It is versioned with React Native, so upgrades update it.

open as a page

How often does React Native release a new minor version, which versions are supported, and what does unsupported mean for your app?

level: juniorimportance: should knowfreq 36%

basics

~20 s

React Native ships a new minor, which may contain breaking changes, roughly every two months and maintains only the latest three minor series. When 0.87 shipped, 0.84 became unsupported: it gets no further patches, even for bugs that affect you.

open as a page

In a bare React Native app, how do you let staging and production builds install side by side, each pointing at its own API?

level: middleimportance: should knowfreq 45%

basics

~20 s

Give each environment its own native variant and app identity: Android product flavors with applicationIdSuffix, iOS build configurations with their own bundle identifier selected by a scheme. Each variant then feeds its own config file, which carries the API URL into the build.

open as a page

In a React Native project created without a framework, what does it mean that you own the ios/ and android/ folders?

level: middleimportance: should knowfreq 40%

basics

~20 s

The native iOS and Android projects are generated once at init and then become source code you commit, edit and maintain yourself, including applying the template's native changes by hand at every React Native upgrade.

open as a page

In a bare React Native 0.87 Android build, what do the JDK, Android SDK and Gradle wrapper each provide, and which versions matter?

level: middleimportance: should knowfreq 42%

basics

~20 s

The JDK runs Gradle and compiles Java and Kotlin (React Native targets Java 17); the Android SDK supplies the platform named by compileSdk (37 in 0.87) plus build tools; the Gradle wrapper pins the Gradle version the project was tested with.

open as a page

In a bare React Native iOS project, why can an Xcode build fail to find Node, and how do .xcode.env and .xcode.env.local fix it?

level: middleimportance: should knowfreq 34%

basics

~20 s

Xcode's build phases run in a non-interactive shell that never loads a version manager like nvm, so node may not be on PATH. React Native's phases read NODE_BINARY from ios/.xcode.env, then from the uncommitted, machine-specific ios/.xcode.env.local.

open as a page

In a React Native CRM app, an @components alias passes tsc but Metro says 'Unable to resolve module'; why, and what fixes it?

level: middleimportance: should knowfreq 44%

basics

~20 s

tsconfig paths only teach tsc where to find types; nothing rewrites the import for Metro. Add the same alias to babel.config.js with babel-plugin-module-resolver, then restart Metro with --reset-cache, since its transform cache does not track babel.config.js.

open as a page

Before a React Native upgrade, how do you check that the app's native libraries will work with the target version?

level: middleimportance: should knowfreq 40%

basics

~20 s

List every dependency that ships native code, check each one's README, changelog and React Native Directory entry for support of the target version, note required upgrades or blockers, then prove it with a clean iOS and Android build on a branch.

open as a page

After adding staging variants to a bare React Native app, how do the Android and iOS build hooks decide whether a variant embeds a JS bundle or loads from Metro?

level: seniorimportance: should knowfreq 24%

basics

~20 s

On Android, the React Native Gradle Plugin bundles every variant not named in debuggableVariants, whose default lists only debug and debugOptimized. On iOS, the bundling build phase treats configurations whose name contains Debug as development builds. Flavored variants break both assumptions.

open as a page

A bank wants to add React Native screens to its existing native iOS and Android apps; how do you embed React Native, and what are the main pitfalls?

level: seniorimportance: should knowfreq 35%

basics

~20 s

Add React Native to the native apps, register a root component with AppRegistry, and host it natively: RCTReactNativeFactory on iOS, a ReactHost with a ReactActivity or ReactFragment on Android. Watch names, release bundling and minimum OS versions.

open as a page

A new hire clones your bare React Native 0.87 app and pod install fails on day one; how do you find which toolchain check broke?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Walk the chain pod install depends on: JavaScript packages installed, Node inside React Native's engine range, the Gemfile's CocoaPods run through Bundler, and a full Xcode of at least 16.1 selected. The first failing link's error message names it.

open as a page

After upgrading to React Native 0.87, tsc rejects imports from react-native/Libraries and useRef<View>; what changed, and how do you migrate or opt out?

level: seniorimportance: should knowfreq 34%

basics

~20 s

React Native 0.87 made the Strict TypeScript API the default: source-generated types scoped to the root react-native export. Deep imports lose their types and refs need *Instance types; migrate, or opt out temporarily through 0.88.

open as a page

Your event-ticketing React Native app is on 0.84, three minors behind 0.87; why step through each minor instead of jumping straight to the latest?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Stepping 0.84 to 0.85 to 0.86 to 0.87 keeps each diff small, lets you see each deprecation warning before the removal it announces, and ties any regression to one release; a single jump mixes three sets of breaking changes into one failing build.

open as a page

Your team has experienced iOS and Android engineers; would you still start a new React Native app framework-first rather than bare, and why?

level: principalimportance: should knowfreq 30%

basics

~20 s

Usually yes: native engineers can still write custom modules and configuration inside a framework, which absorbs routing, builds and upgrades. Go bare only for concrete constraints, such as embedding in native apps or needing core releases early.

open as a page

How would you set an upgrade cadence policy for a team's React Native apps, given a new minor about every two months?

level: principalimportance: should knowfreq 26%

basics

~20 s

Upgrade every minor, or at least every other one, soon after its first patch release, so the app never leaves the three-series support window; give upgrades an owner and a sprint budget, gate them on library support, and verify each on both platforms.

open as a page