React
React is an open-source JavaScript library for building user interfaces, created at Facebook (now Meta) and released in 2013. React introduced the component model and the virtual DOM that have since become the dominant pattern for modern front-end development. The vast majority of new web applications today use React or a React-based framework.
Core ideas
- Components. Functions that return UI; props in, JSX out.
- Hooks. Functions like
useState,useEffect,useMemoadd state and lifecycle to function components. - Virtual DOM and reconciliation. React diffs a virtual representation of the UI and applies minimal changes to the real DOM.
- Unidirectional data flow. Data flows down via props; state changes flow up via callbacks or context.
- React Server Components. Components that render on the server, ship zero JS to the client; the foundation of modern React frameworks.
Common ecosystem
- Frameworks: Next.js, Remix, Expo (for React Native), Astro (with React islands)
- State management: Zustand, Jotai, Redux Toolkit, React Query, SWR
- UI libraries: shadcn/ui, Radix, Headless UI, Chakra, Material UI
- Forms: React Hook Form, Formik, TanStack Form
- Routing: React Router, TanStack Router (when not using a framework)
🔗