Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects

Fadhil

Merged Fadhil Pradipta Widyanto requested to merge fadhil into master
2 files
+ 45
0
Compare changes
  • Side-by-side
  • Inline

Files

+ 17
0
import { useState } from "react";
export const useInput = initialValue => {
const [value, setValue] = useState(initialValue);
return {
value,
setValue,
reset: () => setValue(''),
bind: {
value,
onChange: event => {
setValue(event.target.value);
}
}
}
}
\ No newline at end of file
Loading