JSPM

  • Created
  • Published
  • Downloads 142382
  • Score
    100M100P100Q172343F
  • License Unlicense

Package Exports

  • @reactuses/core
  • @reactuses/core/package.json
  • @reactuses/core/useQRCode

Readme

ReactUse - Collection of essential React Hooks

NPM Version NPM Downloads UnLicense Tree Shaking Friendly TypeScript Support

MCP Support

If you want to use the MCP (Model Context Protocol) integration with reactuse, you can easily set it up with the following configuration. This allows you to run the @reactuses/mcp utility via npx for enhanced command-line support and automation.

Add the following to your configuration:

"@reactuses/mcp": {
  "command": "npx",
  "args": ["-y", "@reactuses/mcp@latest"],
  "type": "stdio"
}

QuickStart

import { useToggle } from '@reactuses/core'

function Demo() {
  const [on, toggle] = useToggle(true)

  return (
    <div>
      <div>{on ? 'ON' : 'OFF'}</div>
      <button onClick={toggle}>Toggle</button>
      <button onClick={() => toggle(true)}>set ON</button>
      <button onClick={() => toggle(false)}>set OFF</button>
    </div>
  )
}

Refer to documentations for more details.


Who's Using This

PDD Ctrip


Documentation & Live Examples


Feedback

You can submit an issue or provide feedback on Discord.


Contribute

See the Contributing Guide

ChangeLog

See the ChangeLog


Thanks

This project is heavily inspired by the following awesome projects.


If my work has helped you, consider buying me a cup of coffee. Thank you very much🥰!.

Buy me a coffee