Search
Find a bite, explore a topic or look for a role.
Results for “React”
Bites 747
Purpose of Outlet in React Router v6 nested routes
Outlet renders the matched child route inside a parent layout, enabling shared chrome with swappable content; configure nested routes and place Outlet where children render.
Tearing and useSyncExternalStore in concurrent React
Tearing is inconsistent UI when an interruptible render reads a changed external store mid-pass; useSyncExternalStore subscribes and forces consistent snapshots, re-rendering synchronously on change.
Testing a component that consumes React Context
Render inside the Context.Provider with a value, or omit it to exercise the default; use a custom render wrapper for reuse.
Purpose of RCTBridgeModule and ReactContextBaseJavaModule
These declare a class as a discoverable native module, provide the JS-facing name, and let RN export methods to JavaScript.
The legacy React Native Bridge architecture
JS, native, and shadow threads communicate via an async, batched, JSON-serialized Bridge.
Web DOM elements vs React Native core components
View maps to UIView/ViewGroup, Text to native text, no HTML or CSS, all text must be inside Text.
Why react-native-gesture-handler Replaces the Responder System
The JS responder system runs on the JS thread so gestures lag under load; gesture-handler runs recognition natively for smooth, reliable gestures.
Responsive Layouts with Core React Native APIs
Lean on flexbox, percentage sizing, useWindowDimensions, SafeAreaView, and Platform; recompute on dimension change.
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.
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.
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.
How react-native-screens optimizes a deep stack
React-native-screens uses native container views so off-screen screens are detached from the view hierarchy and can be freed; enabled by default and powers the native-stack navigator.
Structuring an auth flow in React Navigation
Conditionally render an auth stack versus app stack from state, not navigate calls; store token; let state drive screens.
Using position absolute in React Native
Absolute removes a view from flex flow and positions it relative to its nearest positioned ancestor using top, left, right, bottom; ideal for overlays and badges.
Improving React Native startup time
Enable Hermes for fast bytecode startup, shrink and lazy-load the JS bundle via inline requires and RAM bundles, and defer non-critical native init.
Expo managed workflow vs bare React Native
Expo gives fast setup, OTA updates, managed builds, and prebuilt APIs; bare gives full native control and arbitrary native modules.
Agent planning beyond a ReAct loop
ReAct adapts step by step but costs many calls, plan-then-execute drafts a full plan upfront for fewer calls but is brittle to surprises, hierarchical decomposition splits goals…
Architecting a themeable React component library
A ThemeProvider supplying tokens through Context, components reading them, and CSS variables for performance.
React to location authorization changed in Settings
Implement locationManagerDidChangeAuthorization, which fires on launch and whenever status changes, read authorizationStatus, and start updates when authorized.
Framework-agnostic components across React, Vue, Angular
Web components for one core, framework wrappers for ergonomics, codegen as an alternative, with their costs.