Interview frequency: …
Short answer
Integrate @sentry/react-native (with its Expo config plugin; the old sentry-expo package is deprecated) to record JavaScript and native exceptions and unhandled errors, and upload Source Maps and debug symbols automatically during EAS builds to pinpoint the failing line.
Explanation
Production code is minified and bundled, so raw crash reports show meaningless line numbers. The Sentry plugin in EAS Build automatically uploads Source Maps and native dSYM symbols, so the dashboard can show the exact error location in the original TypeScript file and the user's device context.
Code example
import * as Sentry from "@sentry/react-native";
Sentry.init({
dsn: "https://<key>@o0.ingest.sentry.io/<project-id>",
enabled: !__DEV__, // do not report from development builds
});
export default Sentry.wrap(App);
// app.json → plugins: [["@sentry/react-native/expo", { "organization": "my-org", "project": "my-app" }]]
// The plugin uploads source maps and debug symbols during EAS Build.Common mistakes
- Failing to upload Source Maps and dSYM files, making production errors impossible to trace because the code is obfuscated.
Follow-up questions
- What are Expo Config Plugins, and how do they safely modify native code and libraries?
- How do you manage environment variables safely and reliably in Expo?