Skip to content

v2.1.2

Latest
Compare
Choose a tag to compare
@MrKampla MrKampla released this 25 Apr 18:08
· 2 commits to master since this release
214505b
  • Wrapped openFilePicker in useCallback #87

useFilePicker hook will now return the same function if you memoize the hook props:

const ufpProps = useMemo(() => ({ accept: "*", multiple: true }). []);
const { openFilePicker } = useFilePicker(ufpProps);
// openFilePicker is always gonna stay the same so you can pass it as a dependency to other hooks