h3/use's logo

h3/use

Command Palette

Search for a command to run...

Introduction

Create performant, accessible and type-safe apps with hooks that you can copy and paste into your apps.

h3/use is a collection of re-usable hooks that you can copy and paste into your web apps.

It features hooks and examples of how to use them. All geared towards building apps and websites.

Philosophy

I personally believe that hooks are one of the most powerful features of React. They allow you to create reusable logic that can be used in any component and are a great way to share code accross your app.

The problem

Today, when you want a hook, you have to:

  • Search the web for examples and try to implement it yourself
  • Install and use a library

But this has it drawbacks:

  • When trying to implement a hook, it costs you a lot of time depending on the complexity of the hook and your previous knowledge
  • When you use a library, you have to deal with the possible drawbacks of the library, like the bundle size, the complexity of the code, the maintainability of the code, etc.

The solution

This library aims to solve these problems with the following features:

  • You can copy and paste the hooks into your apps, so you have full control over them
  • The hooks are well documented and have examples of it's usage
  • The hooks are all type-safe and optimized for performance

This library is heavily inspired by https://ui.shadcn.com and https://magicui.design.