React Props and React State — A Complete Guide (2026)

Updated: May 5, 2026

React Props and React State — A Complete Guide (2026)

React's strength lies in how it manages data flow inside applications. Whether you're building reusable UI components or large-scale React applications, understanding props and state is essential. These two core concepts define how data is passed, updated, and rendered throughout the React component lifecycle.

Since 2022, React has evolved significantly. React 19 went stable on December 5, 20241, and React 19.2 followed in October 20252 — bringing Actions, the new use API, native document metadata, and full React Server Components support, on top of the concurrent rendering introduced in React 18. This comprehensive React tutorial explains what props and state are, how they differ, and the React best practices every frontend developer should follow in 2026.


What Are Props and State?

Props (Properties)

  • Inputs passed from parent to child components.
  • Immutable (read-only inside the child).
  • Used for configuration, rendering data, and communication.
  • Examples: title, user, onClick callbacks.

State

  • Data that a component owns and controls.
  • Mutable, updated with hooks like useState or useReducer.
  • Used for interactive behavior: toggles, forms, fetching data, UI updates.
  • Example: form field values, modal open/close status, or a counter.

Props vs. State: Key Differences

AspectPropsState
OwnershipPassed down from parentMaintained inside the component
MutabilityRead-onlyCan be updated with hooks
PurposeConfigure components, pass data & logicTrack and manage local changes
Updates triggerRe-renders when parent re-rendersRe-renders when state changes

Modern React: Updated Usage

In modern React development, functional components with hooks have replaced class-based patterns. Here's how React state management works today.

The useState Hook

Instead of this.setState in class components, React functional components use the useState hook. Prefer the functional updater (prev => prev + 1) when the next value depends on the previous one — it's safer with React 18+ automatic batching and concurrent rendering:

import { useState } from "react";

function Counter() {
  const [count, setCount] = useState(0);
  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(c => c + 1)}>Increment</button>
    </div>
  );
}

React Context API for Prop-Drilling Problems

The React Context API solves prop drilling—avoid passing props through multiple component layers:

import { createContext, useContext } from "react";

const ThemeContext = createContext("light");

function App() {
  return (
    <ThemeContext.Provider value="dark">
      <Toolbar />
    </ThemeContext.Provider>
  );
}

function Toolbar() {
  const theme = useContext(ThemeContext);
  return <button className={theme}>Themed Button</button>;
}

React 18 and 19 Improvements

  • Automatic Batching (React 18): multiple state updates are batched for performance, including inside promises, timeouts, and event handlers.
  • Transitions (React 18): useTransition marks updates as non-urgent for smoother UI during concurrent rendering.
  • Server Components (stable in React 19): props/state considerations shift to hybrid rendering — server components don't have local state but can pass props to client components1.
  • Actions and new hooks (React 19): useActionState, useFormStatus, and useOptimistic make form submissions, pending states, and optimistic UI a built-in pattern1.
  • The use API (React 19): read promises and context conditionally inside render — including after early returns1.

React Best Practices (2026 Edition)

These React performance optimization tips and patterns help you build maintainable, scalable applications:

  1. Keep state minimal — store only what you can't derive from props or other state.
  2. Lift state up only when multiple children need access—a core React design pattern.
  3. Use context or global stores (Redux Toolkit, Zustand, Jotai, TanStack Query) for complex React state management.
  4. Type your props with TypeScriptPropTypes runtime checks were deprecated and are silently ignored in React 193. TypeScript is the recommended replacement.
  5. Prevent unnecessary re-renders — use React.memo, useCallback, and useMemo strategically.
  6. Always use immutable updates — never mutate arrays or objects directly.
  7. Clean up side effects — always return cleanup functions from useEffect hooks.

Example: Combining Props, State, and Context

This example uses TypeScript for prop typing, which is the modern recommendation now that PropTypes is silently ignored in React 193:

import { useState, useCallback, createContext, useContext } from "react";

type Theme = "light" | "dark";

const ThemeContext = createContext<Theme>("light");

interface CounterProps {
  count: number;
  onIncrement: () => void;
}

function App() {
  const [count, setCount] = useState(0);
  const increment = useCallback(() => setCount(c => c + 1), []);

  return (
    <ThemeContext.Provider value="dark">
      <Counter count={count} onIncrement={increment} />
    </ThemeContext.Provider>
  );
}

function Counter({ count, onIncrement }: CounterProps) {
  const theme = useContext(ThemeContext);

  return (
    <div style={{ color: theme === "dark" ? "#fff" : "#000" }}>
      <p>You clicked {count} times</p>
      <button onClick={onIncrement}>Increment</button>
    </div>
  );
}

export default App;

Conclusion

Props and state are the cornerstones of React development. By combining them with React hooks, the Context API, and React 19 features like Actions and the use API, you'll build applications that are both performant and scalable.

Mastering these React fundamentals prepares you for advanced patterns—including React Server Components, global state management with Zustand or Redux, and React performance optimization techniques.

Whether you're building a Next.js application, a Vite React project, a Remix app, or any other modern React setup, these concepts remain essential. (Note: Create React App was officially deprecated by the React team on February 14, 20254 — for new projects, reach for Vite, Next.js, Remix, or Parcel instead.) Keep practicing with real projects and stay updated with the evolving React ecosystem.


Footnotes

  1. React v19 — React blog (Dec 5, 2024) 2 3 4

  2. React 19.2 — React blog (Oct 1, 2025)

  3. React 19 Upgrade Guide — propTypes and defaultProps removed for function components 2

  4. Sunsetting Create React App — React blog (Feb 14, 2025)


FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.