Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alehechka/react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alehechka/react-hooks

[![Version](https://img.shields.io/npm/v/@alehechka/react-hooks.svg)](https://www.npmjs.com/package/@alehechka/react-hooks)

  • 1.0.2-0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Welcome to @alehechka/react-hooks

Version

A collection of useful hooks that I made for personal use, but feel free to include the package in your own projects or contribute! This is a Node.js package available through the npm registry. You can install @alehechka/react-hooks with the yarn add command.

Install

yarn add @alehechka/react-hooks

Usage

useToggle

const [value, toggle, turnOn, turnOff] = useToggle(); // defaults to false

You can also give it another default initial state:

const [value, toggle, turnOn, turnOff] = useToggle(true); // defaults to true

This implementation of useToggle is an extension from Josh Comeau's implementation that includes some useful on/off functions.

Author

👤 Adam Lehechka

🤝 Contributing

Feel free open an issue on the issues page or a pull request in the repo on GitHub!

Show your support

Give a ⭐️ if this project helped you!

License

MIT

Contributions, issues and feature requests are welcome!

FAQs

Package last updated on 19 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc