jpranays/react-fast-hooks — reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript library called react fast hooks, a collection of reusable React hooks that make common app tasks easier without adding much weight. I want it to feel polished and ready to publish, with strong typing, good browser support, server render friendly behavior, and exports set up so people only pull in the hooks they use.

Include a solid set of everyday hooks like battery status, click outside, clipboard copy, cookies, debounce, fetch, geolocation, hover, idle detection, local storage, media query, mouse position, notifications, online status, previous value, script loading, and a few similar useful ones from the docs. Make sure anything that depends on browser only APIs fails safely when rendered on the server.

Also add clear docs with examples for each hook, ideally with a simple demo site or live examples so people can try them quickly. If anything is unclear, look up current React hook library best practices online and make sensible choices.

Want more depth? Deep Reverse