1.1.6 • Published 2 months ago

foxxy_input_value v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Foxxy_input_value


Názov balíčka: foxxy_input_value
Popis: Pomocník pre získavanie value hodnôt z inputov vo formulári
Inštalácia: npm i foxxy_input_value
Licencia: MIT
Email: suchovsky.michal@gmail.com


Priklad pouzitia:

  import { useInputValue } from ....;   
  import { TypeForInputsObject } from ....;   
function App() {
  const { handleSubmit, reset } = useInputValue()

  const submit = (v: TypeForInputsObject["v"]): void => {
    console.log(v);
  };

  return (
    <div className="App">
      <form
        onSubmit={(e) => handleSubmit(e, submit)}>
        <label>
          My inputs
          <input
            name='One'
            type="text"
          />
        </label>
        <label>
          My inputs two
          <input
            name='Two'
            type="text"
          />
        </label>
        <button
          type='submit'>
          click me
        </button>
        <button
          onClick={reset}>
          reset
        </button>
      </form>
    </div>
  )
}
export default App   

Ako kľuče v objekte spätnej odpovedi sa používa atribút "name" !!

1.1.6

2 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.2

6 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago