1.1.0 • Published 9 months ago

@lilib/hooks v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Hooks

React hook library.

Features

  • Supports React 16.8+, 17+ and 18+.
  • Supports SSR.
  • Supports React StrictMode.
  • Supports network requests.
  • Provides 50+ hooks.

Install

npm install --save @lilib/hooks
# Or
yarn add @lilib/hooks
# Or
pnpm add @lilib/hooks

Example

import React from "react";
import { useLoad } from "@lilib/hooks";

function Example() {
  const { data, error, loading } = useLoad(() => {
    return fetch("/users/0").then((response) => response.json());
  });
  ...
}

Document

https://lilibraries.github.io/hooks/

Hooks

Changelog

https://github.com/lilibraries/hooks/blob/master/CHANGELOG.md

License

Code licensed MIT, docs CC BY 4.0.