Introduction
An awesome collection of React Hooks & Utilities!
What is this?
Haiku is a simple
& lightweight
React library with the goal of saving
you time by offering a large collection of hooks
& utilities
that will
help you get the job done faster & more efficiently!
Install
Installing Haiku is very easy!
Requires React >=16.8.0
NPM
npm install react-haiku
Yarn
yarn add react-haiku
PNPM
pnpm install react-haiku
Using Haiku with NextJS
Because Haiku uses ES6 modules, it is not transpiled by NextJS automatically since it's an external dependency, so you may have to follow a few extra steps to set it up correctly:
NOTE: These steps should no longer be required in Next 14 projects.
- Add the
next-transpile-modules
package to your project:
npm install next-transpile-modules
- Configure your project's
next.config.js
file to transpile Haiku:
const withTM = require('next-transpile-modules')(['react-haiku']);
module.exports = withTM({});
After following these two steps, importing features from react-haiku
into your project should work as expected!
I hope you will have as much fun using Haiku as I had creating it!