-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Filepond is quite heavy. Pages using it (/admin/questao-criar & /admin/questao-editar) are ~275kB (from next build). And the API is very bad, probably because it was not originally built for React.
- filepond: 31.9kB
- react-filepond: 1.2kB
- filepond-plugin-image-preview: 8.2kB
- filepond-plugin-image-exif-orientation: 1kB
Total 42.3kB minified + gzipped
react-dropzone
Simple React hook to create a HTML5-compliant drag'n'drop zone for files. --- https://github.com/react-dropzone/react-dropzone
React + FileReader API (no lib)
https://gist.github.com/hartzis/0b77920380736f98e4f9
Preview at: https://codepen.io/hartzis/pen/VvNGZP
This may work with react-dropzone. And also may be a good option to do file uploading through GraphQL.
Someone commented about integrating with react-awesome-slider (8.2kB). Another interesting slider is glider-js (2.7kB) + react-glider (3.4kB) = 6.1kB.
Uppy
This is very fancy, it supports several sources: Web can, Dropbox, Google Drive, etc. It supports resumable uploads, S3 uploads, and much more.
But it's quite big:
- @uppy/core: 14.6kB
- @uppy/react: 46,5kB
- @uppy/dashboard: 43.5kB
- I think this one is optional
All of them bundle Preact which is about 10kB.