Skip to content
tezvyn:

Search

Find a bite, explore a topic or look for a role.

Results for React

Bites 747

React Native2 min read

React DevTools Profiler: Find Slow Renders

The Profiler is a stopwatch for your component tree. It records why each render happened and how long it took, so you can spot unnecessary re-renders in React Native. The footgun is chasing render counts instead of actual frame time.

React Native2 min read

React Native IAP: The Store Bridge

React Native IAP is a bridge, not a store. You ask Apple or Google to charge the user and listen for a receipt. Use it for subscriptions or feature unlocks. The footgun is forgetting to finish transactions natively, leaving users charged but stranded.

React Native2 min read

AsyncStorage: React Native's Async Key-Value Store

AsyncStorage is React Native's bare-bones key-value closet: strings on disk, retrieved asynchronously. Use it for auth tokens, onboarding flags, or cached JSON that survives app restarts. It is plain text and unencrypted; never store passwords or PII here.

React Native2 min read

React Native Offline Sync Strategies

React Native offline sync writes to local storage first, then reconciles with the server later. It keeps forms and messages working offline. The footgun is non-idempotent mutations replayed, creating duplicates or overwriting fresh data.

React Native2 min read

Handling Network Errors in React Native

Network errors are normal state, not bugs to silence. In React Native, every fetch should expect flakiness and surface a retry path. The footgun is treating a timeout as permanent failure and wiping optimistic local state.

React Native2 min read

React Native State Persistence

React Native state dies when the OS kills your app. Persistence writes critical data to disk so users resume where they left off. The footgun is testing with a swipe-close instead of a real process kill, or restoring stale data without schema checks.

React Native2 min read

React Native Gesture Handler: Native-Driven Touch

React Native Gesture Handler moves touch recognition to the native thread so gestures stay smooth when JavaScript is busy. Use it for swipeable cards and bottom sheets. The footgun is using it without Reanimated, gaining complexity without the frame-rate win.

React Native2 min read

Debugging React Native Performance

React Native drops frames when the JS thread overloads, not just from bad code. Complex re-renders, console.log statements, or dev mode freeze touches and animations. Never trust performance numbers from development builds; always test in release mode.

Adaptive React Native UIs for Tablets and Foldables
React Native2 min read

Adaptive React Native UIs for Tablets and Foldables

Adaptive UI is context-aware layout, not just stretching pixels. It matters when a phone app hits a tablet or a foldable unfolds. Most devs stop at flexbox and wonder why the tablet experience still feels like a blown-up phone.

React Native2 min read

React Native's Platform Build Glue

React Native integrates into Android via Gradle files. You edit settings.gradle and both build.gradle files to wire the React Native Gradle Plugin and enable autolinking. The footgun: editing the wrong build.gradle breaks native modules silently.

React Native2 min read

Touchable Components in React Native

TouchableOpacity and siblings wrap views to give press feedback by dimming or highlighting. Use them for simple taps on buttons or list items. They inject extra Animated.View nodes that can silently break layout, and Pressable has superseded the entire family.

Describe a ReAct agent architecture for multi-step dependent tool calls
LLMs & Generative AI2 min read

Describe a ReAct agent architecture for multi-step dependent tool calls

Sketch ReAct's thought-action-observation cycle; keep state in an append-only trajectory; re-plan after each observation.

Svelte's Reactivity: A Compiler, Not a Library
Vue, Angular & Svelte2 min read

Svelte's Reactivity: A Compiler, Not a Library

Svelte achieves reactivity at compile time, not runtime. It's a compiler that turns your component files into efficient, imperative JavaScript that updates the DOM directly, skipping the virtual DOM. The footgun: reactivity only triggers on assignment.

Framework Reactivity: Coarse vs. Fine-Grained Updates
Vue, Angular & Svelte2 min read

Framework Reactivity: Coarse vs. Fine-Grained Updates

Frameworks sync UI and state differently. Coarse-grained systems like React re-run component code, while fine-grained systems like Vue (Proxies) or Angular (Signals) track dependencies to update only what's needed.

Angular's Reactive Form Classes: FormControl, FormGroup, FormArray
Vue, Angular & Svelte2 min read

Angular's Reactive Form Classes: FormControl, FormGroup, FormArray

Reactive forms build a data model in your code, not the template. Use FormControl for one input, FormGroup for a set of fields like a login form, and FormArray for dynamic lists. The main footgun is forgetting to import ReactiveFormsModule.

React Router Data Loaders: Fetch Before You Render
React & Next.js2 min read

React Router Data Loaders: Fetch Before You Render

React Router loaders fetch data *before* a component renders, eliminating loading spinners inside your UI. Use them to load data for a new route in parallel with its code. The footgun: forgetting that loaders must run in both server and browser environments.

React & Next.js2 min read

useNavigate: Programmatic Navigation in React

The useNavigate hook gives you a function to change routes from your component's logic, like after a form submission. Use it for event-driven navigation, such as sending a user to their dashboard after login.

React & Next.js2 min read

React's Internal Scheduler Package

React's scheduler is an internal traffic cop that breaks up rendering work to keep the UI from freezing. It's used to prioritize updates and yield to the browser, but its public API is unstable and not for direct use in your app.

React State Updates: The Queue and the Updater Function
React & Next.js2 min read

React State Updates: The Queue and the Updater Function

React batches state updates from one event, like a waiter taking a full order before heading to the kitchen. This prevents multiple re-renders. The footgun: setCount(count + 1) called three times only increments once, as count is fixed for that render.

React's Current & Work-in-Progress Trees
React & Next.js2 min read

React's Current & Work-in-Progress Trees

React uses a double-buffering technique for non-blocking updates. The current tree is what's on screen; the workInProgress tree is built in the background on state changes. The footgun is confusing this low-level mechanism with the 'virtual DOM'.