0.1.1 • Published 3 years ago

@codewell/target-value v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

@codewell/target-value

Installation

npm install @codewell/target-value

Basic Usage

import targetValue from '@codewell/target-value';

const eventHandler = (inputValue) => {
  // Do something with the input value
  // from the input element
}

const sayHello = (inputValue, hello, there) => {
  console.log(hello, there, inputValue)
}

const SomeComponent = () => (
  <>
    <input onChange={targetValue(eventHandler)} />
    <input onChange={targetValue(sayHello, "hello", "there")} />
  </>
);