@any-hooks/solid

A high-quality & reliable Solid Hooks library.

npmnpm peer dependency versiongzip size

Features

  • Easy to learn and use
  • Supports SSR
  • Contains a large number of advanced Hooks that are refined from business scenarios
  • Contains a comprehensive collection of basic Hooks
  • Written in TypeScript with predictable static types

Usage

Install

# npmnpm i @any-hooks/solid#pnpmpnpm add @any-hooks/solid#yarnyarn add @any-hooks/solid
# npmnpm i @any-hooks/solid#pnpmpnpm add @any-hooks/solid#yarnyarn add @any-hooks/solid

Examples

import { useToggle } from '@any-hooks/solid'function App() {  const [state, { toggle }] = useToggle(false)  return (    <div>      <p>{state()}</p>      <button onClick={toggle}>toggle</button>    </div>  )}
import { useToggle } from '@any-hooks/solid'function App() {  const [state, { toggle }] = useToggle(false)  return (    <div>      <p>{state()}</p>      <button onClick={toggle}>toggle</button>    </div>  )}