Search
Find a bite, explore a topic or look for a role.
Results for “React”
Bites 747
Single useState object for multi-input forms
Hold all fields in one state object, use a generic handler keyed by field name, and update immutably by spreading previous state.
Button vs TouchableOpacity vs Pressable
Button is minimal and platform-styled with limited customization; TouchableOpacity wraps children with an opacity fade; Pressable is the modern, flexible primitive exposing rich press states.
How StyleSheet.create reduces styling overhead
StyleSheet styles are created once with stable references, so identical renders skip reallocation and reduce diffing and serialization work; inline literals allocate new objects each render…
Why Text inherits styles but View does not
Nested Text inherits text styles because it maps to platform attributed-text rendering, while Views are independent layout boxes with no style cascade.
Default flexDirection and header-content-footer layout
Default flexDirection is column, unlike web's row; give the root flex 1, fixed heights to header and footer, and flex 1 to a scrollable middle.
View vs Text and nesting rules
View is a flexbox layout container; Text renders and lays out text with inheritance. Text nests inside Text and inherits style; View inside Text is constrained and discouraged.
Inline styles vs StyleSheet.create
Styles are JS objects passed to the style prop; StyleSheet.create registers styles once for stable references and validation, while inline objects recreate on each render.
Building a native module from scratch
Write a native module class with exported methods or constants, register it via a package, then expose a typed JS wrapper.
The three states of a JavaScript Promise
Pending, fulfilled, rejected; settle is one-way and final; create with the executor calling resolve or reject, consume with then and catch.
What is blast radius and how do you limit it?
Blast radius is the scope of users or systems an experiment can harm; limit it by targeting a small traffic percentage and by having an automated abort.
Design a chaos experiment for a payment dependency?
Define a measurable steady state, hypothesize it holds when payments fail, limit blast radius to a small traffic slice, and auto-abort on SLO breach.
Designing an autonomous research-and-report agent
Planner that decomposes goals, short-term scratchpad plus long-term vector memory, structured tool calls, and a reflect-retry loop for error correction.
Managing cross-framework parity in a design system
Shared token and spec source of truth, optional Web Components core, per-framework wrappers, a parity matrix, coordinated releases.
Repo and versioning strategy for multi-platform DS
Shared platform-agnostic tokens as source of truth, per-platform packages, independent semver, a monorepo with workspaces.
Performance trade-offs of abstracting native UI
Bridge/serialization overhead, JS-thread bottlenecks for lists, and mitigations like virtualization, native modules, and profiling both threads.
Sharing logic, native UI across platforms
Shared module (e.g. Kotlin Multiplatform) for state/business rules, platform-native UI consuming it, and a clean interface boundary.
Preventing theme flash in SSR apps
Flash comes from server not knowing client preference; fix with a blocking inline script setting the theme before paint.
Coexisting major versions during migration
Scoped aliases or namespaced packages, isolated token scopes, and incremental migration.
Core roles on a design system team
Name design, engineering, product/PM, and accessibility/docs roles with clear ownership.
Bundling a library for tree-shaking and multiple formats
Externalize peers, emit ESM and CJS, preserve modules for tree-shaking, set sideEffects false, ship types.