
JavaScript Sleep Function with Promise and setTimeout
Discover how to pause JavaScript execution with a sleep function using Promise and setTimeout. Includes TypeScript and React examples for simulating API calls or loading states

Discover how to pause JavaScript execution with a sleep function using Promise and setTimeout. Includes TypeScript and React examples for simulating API calls or loading states

The compound component pattern is a powerful way to build flexible and reusable React components. Instead of overloading props, you split responsibilities into smaller subcomponents, offering a clean API and better scalability. Learn how to implement it with a practical UserCard example.

Let's improve React Context performance by using react-context-selector to avoid unnecessary re-renders and optimize component updates efficiently

This article presents a common pattern for fetching data on the client side using the latest version of React (v19.1 at the time of writing) in a way that is easy to implement, clear, and robust enough to get the job done.

I believe that a website or app's progress indicator should respect the global theme and have a touch of originality. That's why I never use an external library or package for it. I prefer to create my own component, keeping it as lightweight as possible and fully customizable.
With React and Tailwind, it's a piece of cake !