Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

4330 bites

Page 60

React Native1 min read

Direct events vs bubbling events in native components

Direct events fire only on the originating component; bubbling events propagate up the component tree like the DOM, allowing parent capture.

React Native1 min read

What are the three pillars of the New Architecture?

JSI for direct JS-native calls, Fabric as the new renderer, and TurboModules for lazy native modules, all unified by CodeGen for type-safe bindings.

React Native1 min read

What do the spec file and CodeGen do in migration?

The spec file declares the component's typed props and events; CodeGen reads it at build time to generate type-safe C++/native and JS glue, catching mismatches early.

React Native1 min read

Why use a C++ TurboModule, and what are the risks?

C++ JSI bindings give synchronous, serialization-free calls and shared cross-platform code; challenges are manual memory ownership across the JS-C++ boundary, GC interaction, and thread safety.

React Native1 min read

Unit testing vs component testing in React Native

Unit tests verify isolated functions/logic with Jest; component tests render components and assert behavior with React Native Testing Library.

React Native1 min read

How do you mock a fetch call in Jest tests?

Replace global fetch with a Jest mock or a library like jest-fetch-mock, return a resolved Promise with a fake Response, and reset mocks between tests.

React Native1 min read

How do you test a component using a native module?

Native code is absent in the Node-based Jest environment, so you mock the module with jest.mock to return fake values, often via the library's provided jest mock.

React Native1 min read

What does 'test behavior, not implementation' mean?

Query elements the way a user finds them (text, role, label) and assert observable behavior; for a Button, fire press and assert the visible effect, not internal state.

React Native1 min read

RNTL or Detox for a navigation flow?

RNTL can test navigation logic by rendering the navigator in JS and asserting screen changes; Detox runs the real app for true end-to-end confidence including native transitions.

React Native1 min read

What are the key challenges of setting up Detox E2E?

Maintain separate debug/release build configs, rely on Detox automatic synchronization but tame uncontrolled async like timers and animations, and stabilize CI with headless emulators and retries.

React Native1 min read

How do you catch RN performance regressions?

Track TTI, JS and UI thread FPS, and memory; baseline them and gate CI with automated tools like Flashlight, using the React profiler and DevTools to diagnose.

React Native1 min read

iOS Provisioning Profiles and Signing Certificates

The certificate proves developer identity, the App ID names the app, the profile binds certificate, App ID, and devices.

React Native1 min read

Managing Per-Environment Configuration in React Native

Use per-environment env files plus build flavors or schemes, inject at build time, keep secrets off the device.

React Native1 min read

Android App Bundles versus Universal APKs

An AAB is an upload format; Play generates per-device APKs via dynamic delivery, shrinking download size.

React Native1 min read

Over-the-Air Updates for JavaScript-Only Fixes

Ship a new JS bundle the app downloads at runtime and applies on next launch, with no store review.

React Native1 min read

CI/CD Pipeline for React Native to TestFlight and Play

A triggered workflow installs deps, builds signed artifacts on macOS and Linux runners, uploads via Fastlane to TestFlight and the Play internal track.

React Native1 min read

Designing a Fastfile for Versioning, match, and Uploads

Lanes bump versions, run match for signing, build with gym and gradle, upload via pilot and supply; secrets come from CI env or a vault.

React Native1 min read

Optimizing Slow iOS CI Build Times

Profile the build, cache CocoaPods and DerivedData, use prebuilt frameworks, parallelize, scope to changed work.

React Native1 min read

Limits of OTA Updates and Runtime Versions

OTA ships only JS and assets; native changes need a store build; runtime versions gate compatibility.

React Native1 min read

StyleSheet.create and Inline Style Tradeoffs

Styles are JS objects of subset-CSS properties; StyleSheet.create validates them and yields stable references, while inline objects allocate each render.