@lpsci/hooks
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@lpsci/hooks

A highly performant and extensible react hooks for LPSci Web Dev

NPM npm bundle size (scoped) npm bundle size (scoped version) Libraries.io dependency status for latest release, scoped npm package NPM

Table of Contents

Installation

This library is available through the npm registry.

NPM

$ npm -i @lpsci/hooks

Yarn

$ yarn add @lpsci/hooks

Import

Start using it by importing the library first.

CommonJS

const hooks = require('@lpsci/hooks');

ES6

import { useCounter } from '@lpsci/hooks';

Usage

Create a counter with useCounter

import { useCounter } from '@lpsci/hooks';

/**
 * Set initial value to 5, defaults to 0 when a
 * value is not passed
 */
const counter = useCounter(5)

/**
 * Increments the counter state by 10, defaults to 1 when
 * a value is not passed
 */
counter.increment(10)

counter.count // => 15

Read the docs for more.

Authors


Prince Neil Cedrick Castro

💻 🎨 📖 ⚠️

Here is the list of contributors who participated in this project.

Changelog

Changelog

License

MIT

Package Sidebar

Install

npm i @lpsci/hooks

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

102 kB

Total Files

47

Last publish

Collaborators

  • princedev