Adding native code to Expo without ejecting
knowing modern Expo CNG and dev clients.
use prebuild with config plugins to inject native changes, build a custom development client with EAS, keep native folders generated not hand-edited.
WHAT THIS TESTS The interviewer wants to see that you know the current Expo workflow, where adding native code no longer means a one-way eject, and that you understand config plugins, prebuild, and development clients.
A GOOD ANSWER COVERS Modern Expo uses Continuous Native Generation. Rather than checking in and editing the ios and android folders, you describe required native changes in app.json or app.config.js and through config plugins, then run expo prebuild to generate the native projects on demand. A config plugin is JavaScript that programmatically applies native edits such as Info.plist keys, permissions, Gradle changes, or linking the SDK, so the changes are reproducible and survive regeneration. Many SDKs ship their own plugin; if not, you write a small custom plugin. To actually run native code that is not in Expo Go, you build a custom development client with EAS Build (expo run or eas build with a development profile). That client behaves like Expo Go but contains your extra native code, so you keep over-the-air JS reloading and fast iteration. Nothing is permanently ejected; you can still upgrade Expo SDK cleanly.
COMMON WRONG ANSWERS Recommending expo eject is outdated; that command is deprecated in favor of prebuild and CNG. Manually editing the generated ios and android folders works once but is lost on the next prebuild unless captured in a plugin. Assuming the SDK can run in Expo Go fails because Expo Go ships a fixed set of native modules.
LIKELY FOLLOW-UPS What is the difference between Expo Go and a development client? Expo Go is a prebuilt sandbox app with fixed modules; a dev client is your own build including custom native code. When would you keep the native folders committed (bare-ish)? When prebuild cannot express a change, though plugins usually can. How do plugins stay idempotent? They check before applying edits.
ONE CONCRETE EXAMPLE To add a payment SDK needing a native module and an Info.plist permission, you install its Expo config plugin, list it under plugins in app.config.js, run expo prebuild, then eas build with a development profile. The resulting dev client includes the SDK; you keep iterating on JS without touching native folders by hand.
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.