A comprehensive collection of modern React design patterns and best practices, built with Next.js.
Visit the live website: https://reactjs-patterns.netlify.app/
This repository showcases various React patterns including:
- Representational Component - Components that focus on rendering UI without managing state
- Compound Component - Components that work together to form a cohesive UI pattern
- Higher Order Component - Functions that take a component and return a new enhanced component
- Render Props - Sharing code between components using props whose value is a function
- Controlled Component - Components where form data is handled by React component state
- Uncontrolled Component - Components that maintain their own internal state using refs
- Context API - Sharing state across components without prop drilling
- Hooks - Functions that let you use state and lifecycle features in functional components
- Custom Hooks - Extracting component logic into reusable functions
- Portals - Rendering elements outside the React DOM hierarchy
- Lazy Loading - Loading components only when they are needed
- Error Boundaries - Catching JavaScript errors in UI components
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- React - v19
- Next.js - v15
- TypeScript
- Tailwind CSS - v4
Current version: 1.0.0
Latest release: v1.0.0
To explore each pattern in detail, navigate through the site sections or check the source code in the corresponding directories.
This project is available for educational purposes under the MIT License.
react, design-patterns, nextjs, typescript, tailwindcss, education, frontend