Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. import { useState } from 'react';
  2.  
  3. export const useInputValue = (initial) => {
  4. const [value, setValue] = useState(initial)
  5. return { value, onChange: e => setValue(e.target.value) }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement