Sample questions
Question 1Easy
What does Codegen take as its input?
- Typed specs written in TypeScript or Flow
- Swift and Kotlin source files from the app
- The compiled Hermes bytecode of the app
- JSON files exported from the app's design tool
Answer: A. Typed specs written in TypeScript or Flow
Explanation
Developers write a typed spec for a module or component. Codegen reads it and generates the native interface code.
Step-by-step solution
- Codegen reads a typed spec written for a module or component.
- The spec is written in TypeScript or Flow.
- From it, Codegen generates the native interface code, so the input is option A.
Why the other options are wrong
- B. Codegen does not read Swift or Kotlin source as its input.
- C. Codegen does not read compiled Hermes bytecode.
- D. Design tool JSON files are not Codegen input.
Tip: Codegen starts from a typed spec file and creates the native code from it.
Question 2Easy
In React Native's new architecture, what is Fabric?
- The new JavaScript engine
- The new rendering system
- The new bundler
- The new navigation library
Answer: B. The new rendering system
Explanation
Fabric is the renderer that turns React's output into native views. Hermes is the engine and Metro the bundler.
Step-by-step solution
- Fabric is the name of the new rendering system in React Native's new architecture.
- It turns React's output into native views.
- So Fabric is option B, the new rendering system.
Why the other options are wrong
- A. The JavaScript engine is Hermes, not Fabric.
- C. Metro is the bundler, not Fabric.
- D. React Navigation is the navigation library, not Fabric.
Tip: Fabric renders, Hermes runs JavaScript, TurboModules handle native modules.
Question 3Easy
- The new-architecture system for native modules, accessed through JSI
- A faster bundler that replaces Metro in production builds
- Native UI widgets that are drawn with the GPU directly
- Precompiled JavaScript bytecode files shipped in the app
Answer: A. The new-architecture system for native modules, accessed through JSI
Explanation
TurboModules replace legacy native modules. They are typed, loaded lazily and called through JSI rather than the bridge.
Step-by-step solution
- TurboModules are the new native modules.
- They are called through JSI.
Why the other options are wrong
- B. Metro still bundles.
- C. They're not UI.
- D. They're not bytecode.
Tip: Turbo = JSI.
Question 4Easy
Does adopting the new architecture usually require rewriting an app's React components?
- Yes; every component must be rewritten as a class component
- Yes; all
JSX must be converted to native XML layouts - No; mostly internals change, so components stay the same
- Yes; components must be ported to C++ before they work
Answer: C. No; mostly internals change, so components stay the same
Explanation
The new architecture changes how React Native talks to native code. Ordinary app components keep working; native libraries are the main thing that needs updates.
Step-by-step solution
- The new architecture changes how React Native talks to native code.
- Ordinary app components are written in JavaScript and keep working.
- Native libraries are what usually need updates, not the app's components.
- So the answer is option C: no, components stay the same.
Why the other options are wrong
- A. Components do not have to be class components; function components keep working.
- B. JSX stays as it is; it does not become native XML layouts.
- D. Components are JavaScript, so they are not ported to C++.
Tip: Adopting the new architecture is mostly about native libraries; app components usually need no rewrite.
Question 5Medium
How do many libraries written for the old architecture keep working in a new-architecture app?
- Through an interop layer for legacy modules and views
- They are automatically rewritten into C++ during app install
- They are disabled, because the two systems cannot coexist
- They run in a second JavaScript engine just for old code
Answer: A. Through an interop layer for legacy modules and views
Explanation
React Native includes interop layers so most legacy native modules and components keep working while libraries migrate.
Step-by-step solution
- The new architecture includes interop layers.
- The interop layers let most legacy native modules and components keep working.
- So libraries written for the old architecture keep working through an interop layer, which is option A.
Why the other options are wrong
- B. Libraries are not rewritten into C++ at install time.
- C. The two systems can coexist, which is what the interop layer provides.
- D. Old code does not run in a second JavaScript engine.
Tip: The interop layer lets legacy libraries work while they are updated.
Question 6Medium
What does 'bridgeless mode' mean in React Native?
- The app runs with no legacy bridge; JSI handles everything
- The app runs JS without any engine by compiling it ahead of time
- The app avoids native code completely and draws in a WebView
- The app cannot call native modules and only renders UI
Answer: A. The app runs with no legacy bridge; JSI handles everything
Explanation
Bridgeless mode removes the old asynchronous bridge entirely. Modules, events and rendering all go through JSI-based paths.
Step-by-step solution
- Bridgeless mode means the app runs without the old asynchronous bridge.
- JSI, a C++ interface, handles the work that the bridge used to do.
- So bridgeless mode is the app running with no legacy bridge, which is option A.
Why the other options are wrong
- B. The JavaScript still runs in an engine such as Hermes; it is not compiled ahead of time to remove the engine.
- C. Bridgeless mode is not about drawing in a WebView; the app still uses native views.
- D. Native modules still work in bridgeless mode; they are called through JSI.
Tip: Bridgeless means no old bridge; JSI carries the calls between JavaScript and native code.
Question 7Medium
What problem does Codegen solve for native modules and components?
- It converts JavaScript app code into Swift and Kotlin
- It minifies the JS bundle to make release builds smaller
- It writes unit tests for each native method automatically
- Type-safe glue code, so JS and native signatures match
Answer: D. Type-safe glue code, so JS and native signatures match
Explanation
From one typed spec, Codegen emits the C++ and platform interfaces. A mismatch between JS and native is caught at build time instead of crashing at runtime.
Step-by-step solution
- Native modules need matching JS and native signatures.
- Codegen reads a typed spec.
- It generates the glue code so mismatches are caught at build time.
Why the other options are wrong
- A. It does not translate app code.
- B. Minifying is done by the bundler.
- C. It does not write tests.
Tip: One spec, matching code.
Question 8Medium
Why do TurboModules help app startup time compared with legacy native modules?
- They are written in JS, so no native code is loaded
- They are bundled into the JS file, skipping native setup
- They are loaded lazily, only when JS first uses them
- They run on a GPU thread that starts in parallel
Answer: C. They are loaded lazily, only when JS first uses them
Explanation
Legacy modules were typically all initialised at startup. TurboModules are created on first access, so unused modules cost nothing at launch.
Step-by-step solution
- Legacy native modules were all set up when the app started.
- TurboModules are created only when JavaScript first accesses them.
- So unused modules cost nothing at launch, which is option C.
Why the other options are wrong
- A. TurboModules still use native code; they are not written in JavaScript.
- B. TurboModules are not bundled into the JavaScript file to skip native setup.
- D. TurboModules do not run on a GPU thread to start in parallel.
Tip: Lazy loading defers native module setup until the first use, which speeds up startup.
Question 9Hard
Which capability does Fabric make possible that the legacy renderer could not support properly?
- Rendering components with JSX instead of plain function calls
- Running JavaScript code on Android devices at all
- Using Flexbox for layout instead of absolute positioning
- React's concurrent features, such as transitions and Suspense
Answer: D. React's concurrent features, such as transitions and Suspense
Explanation
Fabric can render on multiple priorities and lay out synchronously when needed, which concurrent React relies on. JSX and Flexbox worked long before.
Step-by-step solution
- Concurrent React features such as transitions and Suspense need the renderer to work on several priorities.
- Fabric supports this, including synchronous layout when it is needed.
- The legacy renderer could not support these features properly.
- So the capability is option D, concurrent features.
Why the other options are wrong
- A. JSX was already used with the legacy renderer, so it is not new in Fabric.
- B. JavaScript already ran on Android before Fabric existed.
- C. Flexbox was already used for layout before Fabric, so Fabric did not add it.
Tip: Fabric is the piece that makes React concurrent features possible in React Native.
Question 10Hard
What is a Fabric Native Component?
- A React component that is rendered by a hidden WebView
- A JavaScript-only component optimised by the Hermes engine
- A native module function that returns JSX elements from Kotlin code
- A native view whose typed spec Codegen turns into Fabric glue
Answer: D. A native view whose typed spec Codegen turns into Fabric glue
Explanation
Native views written for the new renderer declare their props in a typed spec. Codegen generates the code that connects them to Fabric.
Step-by-step solution
- A Fabric Native Component is a native view written for the new renderer.
- Its props are declared in a typed spec file.
- Codegen reads that spec and generates the glue code that connects the view to Fabric.
- So the correct answer is option D.
Why the other options are wrong
- A. A Fabric Native Component is a native view, not a component drawn in a WebView.
- B. It is a native view, not a JavaScript-only component.
- C. It is a native view, not a native module that returns JSX.
Tip: A typed spec plus Codegen connects a native view to Fabric.
Practise all 13 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →