Reactopia
BrowseDiscoverSVG toolsAIChangelogAboutContact
BrowseDiscoverSVG toolsAI
Created by

Yash Mahajan


Reactopia

Open React tooling: components, SVG animation, and a growing directory. Built by Yash Mahajan.

Product

  • Components
  • Discover
  • SVG tools
  • AI direction

Legal

  • Privacy Policy
  • Terms of Use
  • Cookie Policy
  • License
  • Credits
  • Contact

Project

  • About
  • Changelog
  • GitHub
  • X

© 2026 Reactopia. All rights reserved.

PrivacyTermsCookies

Getting Started

IntroductionContributing

Components

SeparatorUiButtonBadgeStackUiInputIn devUiSelectIn devUiTextareaIn dev

Hooks

useDebounceuseLocalStorageuseMediaQueryuseMounted

Utilities

cngroupBysleep
Components
sleep

sleep

Promise-based delay for async code.

LiveutilityReact, Web, React NativeUpdated 2026-10-07MIT LicenseSource on GitHubReport Issue
groupBy

Introduction

Pause async flow for a number of milliseconds. Useful in demos, retries with backoff, or tests.

Platform: TypeScript / JavaScript. Dependencies: none.

Utility

Example

Footer

In production retry logic, prefer exponential backoff with a max delay instead of fixed sleeps.

await sleep(200);
await refetch();
export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
ts