@whitetrefoil/use-link-state
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@whitetrefoil/use-link-state

A tiny helper to link useState & events.

Usage

import {useLinkState} from '@whitetrefoil/use-link-state'


const MyElem = () => {
  const [val, setVal, linkVal] = useLinkState('')
  return (
    <input type="text" value={val} onChange={linkVal}/>
  )
}

Readme

Keywords

Package Sidebar

Install

npm i @whitetrefoil/use-link-state

Weekly Downloads

0

Version

0.2.0

License

Unlicense

Unpacked Size

3.59 kB

Total Files

8

Last publish

Collaborators

  • whitetrefoil