@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}/>
  )
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @whitetrefoil/use-link-state

Weekly Downloads

1

Version

0.2.0

License

Unlicense

Unpacked Size

3.59 kB

Total Files

8

Last publish

Collaborators

  • whitetrefoil