React Native · Mobile UI at native speed

Which React hooks matter most in React Native?

EasyhooksappstateeffectsUpdated Oct 2026
Quiz this track

Short answer

useState and useEffect cover most needs, while useRef, useMemo, useCallback and platform hooks such as useWindowDimensions and useColorScheme address performance and device concerns.

React Native uses the same hooks as React, plus a few platform-aware hooks. The important difference is that effects often subscribe to native events such as app foregrounding, keyboard changes or network status, and those subscriptions must be cleaned up.

tsx
import { useEffect, useState } from "react";
import { AppState } from "react-native";

export function useAppActive() {
  const [active, setActive] = useState(AppState.currentState === "active");

  useEffect(() => {
    const subscription = AppState.addEventListener("change", (state) => {
      setActive(state === "active");
    });

    return () => subscription.remove();
  }, []);

  return active;
}
Subscriptions in effects must return a cleanup that removes the listener.

Where each hook fits

  • useState for local values that drive rendering
  • useRef for timers, previous values and mutable instances that should not trigger renders
  • useEffect for subscriptions and side effects, with cleanup
  • useMemo and useCallback for stable expensive values or callbacks passed to memoised children
  • useWindowDimensions and useColorScheme for responsive and theme-aware UI

Do not wrap every value in useMemo. The hook has its own cost and adds noise. Use it when a computation is expensive or when identity matters to a child's memoisation. Profile before optimising.

An effect that runs on every render and calls setState can loop forever. Check the dependency array and make sure the state update is conditional.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What is the difference between useRef and useState?
  2. 2When should you avoid useMemo?
  3. 3How do you clean up native event subscriptions?
  4. 4How do you react to app background and foreground changes?

Say it in the interview

The core hooks are the same as React, but React Native effects often subscribe to native events like AppState or keyboard changes, so cleanup matters a lot. I use refs for timers and mutable values, and reserve useMemo and useCallback for cases where identity or computation cost actually matters. I avoid optimising by habit and profile before adding memoisation.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.