Intermediate everything in Mobile Dev, page 4
Handling async API calls in Redux
Middleware intercepts dispatched actions, Thunk dispatches functions for simple flows, Saga uses generators for complex orchestration.
Redux principles: store, actions, reducers
One store holds all state; actions are plain objects describing what happened; pure reducers compute the next immutable state from current state and action; dispatch drives the cycle.
Context re-renders when unrelated value changes
Every consumer re-renders when the Provider value reference changes, regardless of which field it uses; fix by splitting into separate contexts or memoizing and selecting.
Optimizing FlatList with variable item heights
Implement getItemLayout to return each item's length and cumulative offset so FlatList skips measurement and scrollToIndex works precisely; precompute heights per item type.
Implementing infinite scroll with FlatList
Use onEndReached with onEndReachedThreshold to fetch the next page, append results, and show a footer loader; guard with a loading flag to prevent duplicate fetches.
Re-rendering FlatList on external state change
FlatList is a PureComponent and only checks data and extraData by reference, so pass the external value via extraData and ensure renderItem reads current state.
Diagnosing slow FlatList scroll and blank cells
Memoize renderItem and items, supply getItemLayout for fixed heights, tune windowSize, maxToRenderPerBatch, initialNumToRender, and removeClippedSubviews; profile first.
Setting screen options statically versus dynamically
Options prop on Screen (can read route) versus navigation.setOptions inside the screen for state-driven changes.
Accessing navigation outside a screen component
Use the useNavigation hook inside any component under NavigationContainer; for navigating outside React, use a navigationRef.
Refetching data when a screen gains focus
Use useFocusEffect with a useCallback callback; refetch on focus; clean up to abort stale requests.
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.
keyboardShouldPersistTaps in ScrollView
KeyboardShouldPersistTaps controls whether taps dismiss the keyboard or reach children; values never, always, and handled.
Gesture Responder System lifecycle
A single view becomes the responder for a touch; onStartShouldSetResponder claims it at touch start, onMoveShouldSetResponder claims it on movement, then grant, move, and release callbacks fire.
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.
Circular View with centered text
Set equal width and height, borderRadius to half that, then justifyContent and alignItems center to place the Text in the middle.
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.
alignItems vs justifyContent in flexbox
JustifyContent aligns along the main axis, alignItems aligns along the cross axis; with column direction main is vertical and cross is horizontal.
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.
Fabric Native Components
Fabric Native Components are host platform views exposed to React under the New Architecture. They use JSI and a C++ rendering core so the shadow tree, layout, and view updates run synchronously without the legacy async bridge, reducing latency and tearing.
R8 shrinking, obfuscation, and optimization
Shrinking removes unused code/resources, obfuscation renames symbols to short opaque names, optimization inlines and simplifies; shrinking also strips unreachable code that could be exploited.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles