DEV Community

Alex Gurr
Alex Gurr

Posted on • Edited on

5

React Drive - An all-in-one react wrapper around Google's drive file picker. Supports direct downloads & blob exports.

https://github.com/alexgurr/react-drive

https://developers.google.com/drive/api/v3/picker

I made this library to try and solve a bit more of the file picker flow, while providing a bit more simplicity with use. React drive can automatically pull down any selected files as blobs or download them directly to the user's machine (as well as passing the drive docs if needed).

Examples and docs in the readme. Feel free to add any issues/feature requests in the repo.

There's only one existing library that's similar to this and it doesn't really have any smarts around post-file selection. It also exposes a lot of props that really aren't needed in my opinion.

Top comments (0)

typescript

11 Tips That Make You a Better Typescript Programmer

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay