36 changes · 3 breaking
01Functional ComponentsReact 0.14

Stateless functional components introduced as pure functions from props to UI.

javascript
// Stateless functional component
const Greeting = ({ name }) => <h1>Hello, {name}!</h1>;
02ReactDOM splitReact 0.14

React and ReactDOM separated into two packages, enabling React Native and other renderers.

03Refs as callbacksReact 0.14

Ref callbacks allow direct DOM access.

javascript
<input ref={node => { this.input = node; }} />
04Fiber ReconcilerReact 16 — Fiber

Rewrote the reconciler for incremental rendering. Foundation for all future concurrent features.

05Error BoundariesReact 16 — Fiber

componentDidCatch and getDerivedStateFromError catch errors in the component tree.

javascript
class Boundary extends Component {
static getDerivedStateFromError(error) {
return { hasError: true };
}
}
06PortalsReact 16 — Fiber

Render children outside the parent DOM hierarchy.

javascript
ReactDOM.createPortal(children, document.body)
07FragmentsReact 16 — Fiber

Return multiple elements from render without a wrapping DOM node.

javascript
return <><h1>Title</h1><p>Body</p></>;
08Return arrays and stringsReact 16 — Fiber

Components can now return arrays of elements or plain strings from render.

09New Context APIReact 16.3

createContext and Context.Provider replaced the old context API.

javascript
const ThemeContext = createContext('light');
<ThemeContext.Provider value="dark">...</ThemeContext.Provider>
10createRefReact 16.3

Object-based ref API replacing callback refs for most use cases.

javascript
this.myRef = createRef();
<input ref={this.myRef} />
11getDerivedStateFromPropsReact 16.3

Replaces componentWillReceiveProps for syncing state from props.

12Lifecycle method deprecationsReact 16.3Breaking

componentWillMount, componentWillReceiveProps, componentWillUpdate marked UNSAFE_.

13React.lazy & SuspenseReact 16.6

Code-split components with dynamic imports and show fallbacks during loading.

javascript
const OtherComponent = React.lazy(() => import('./Other'));
<Suspense fallback={<Spinner />}>
<OtherComponent />
</Suspense>
14React.memoReact 16.6

HOC equivalent of PureComponent for function components.

javascript
const Expensive = React.memo(function Expensive({ value }) {
return <div>{value}</div>;
});
15static contextTypeReact 16.6

Subscribe to context in class components without Consumer wrapper.

16useStateReact 16.8 — Hooks

Local state in function components.

javascript
const [count, setCount] = useState(0);
17useEffectReact 16.8 — Hooks

Side effects and lifecycle in function components.

javascript
useEffect(() => { document.title = count; }, [count]);
18useContext, useReducer, useRefReact 16.8 — Hooks

Context consumption, complex state, and mutable refs in functions.

19useMemo & useCallbackReact 16.8 — Hooks

Memoize values and functions for performance optimization.

20Custom HooksReact 16.8 — Hooks

Extract and share stateful logic between components without HOCs or render props.

javascript
function useWindowSize() {
const [size, setSize] = useState({ width: 0, height: 0 });
useEffect(() => {
const handler = () => setSize({ width: window.innerWidth, height: window.innerHeight });
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler);
}, []);
return size;
}
21No breaking changes for appsReact 17

A "stepping stone" release focused on making future upgrades easier.

22New JSX TransformReact 17

No longer need to import React in every file with JSX.

javascript
// Before React 17: required
import React from 'react';
// After React 17: not needed for JSX
function App() { return <h1>Hello</h1>; }
23Event delegation changeReact 17Breaking

Events now attach to the React root instead of document — fixes issues with multiple React versions.

24Gradual upgradesReact 17

Multiple versions of React can run on the same page, enabling gradual migration.

25Concurrent RenderingReact 18 — Concurrent

React can interrupt, pause, and resume renders to keep the UI responsive.

26Automatic BatchingReact 18 — Concurrent

setState calls inside Promises, setTimeout, and native events are now automatically batched.

javascript
// React 17: two re-renders
setTimeout(() => {
setCount(c => c + 1);
setFlag(f => !f);
}, 1000);
// React 18: one re-render (automatic batching)
27useTransition & useDeferredValueReact 18 — Concurrent

Mark non-urgent updates to prioritize responsive interactions.

javascript
const [isPending, startTransition] = useTransition();
startTransition(() => setFilter(input)); // interruptible
28Suspense on the serverReact 18 — Concurrent

Streaming SSR with selective hydration — progressively stream HTML with Suspense boundaries.

29useIdReact 18 — Concurrent

Generate stable IDs for accessibility attributes, safe across server and client.

javascript
const id = useId(); // ':r0:' — stable across renders
30createRootReact 18 — ConcurrentBreaking

New root API replaces ReactDOM.render. Required to opt into React 18 features.

javascript
import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')).render(<App />);
31use() HookReact 19

Read Promises or Context in the render function — can be called conditionally.

javascript
function UserProfile({ userPromise }) {
const user = use(userPromise); // suspends until resolved
return <h1>{user.name}</h1>;
}
32Server Components (stable)React 19

Run-on-server components with direct data access and zero client bundle impact.

javascript
// No 'use client' = Server Component
async function Page({ params }) {
const data = await db.query(params.id);
return <Layout data={data} />;
}
33Actions & useActionStateReact 19

Async functions for form submissions and mutations with built-in pending/error state.

javascript
const [state, action, isPending] = useActionState(serverAction, null);
34ref as a propReact 19

ref can now be passed as a regular prop — forwardRef is no longer required.

javascript
// React 19: no forwardRef needed
function Input({ ref, ...props }) {
return <input ref={ref} {...props} />;
}
35useOptimisticReact 19

Show an optimistic state immediately while an async operation completes in the background.

javascript
const [optimisticLikes, addOptimisticLike] = useOptimistic(
likes,
(state, delta) => state + delta
);
36Document metadata supportReact 19

title, meta, and link tags inside components are hoisted to <head> automatically.

javascript
function BlogPost({ post }) {
return (
<article>
<title>{post.title}</title>
<meta name="description" content={post.excerpt} />
<h1>{post.title}</h1>
</article>
);
}