Material-UI-Dropzone Typescript Example


This NPM plugin:
is very popular, however the examples are in JavaScript. Here’s a typescript equivalent of their posted example:

import React, { useState } from "react";
import { DropzoneAreaBase } from "material-ui-dropzone";
import "./styles.css";
const Home = () => {
const [files, setFiles] = useState([]);
const handleAdd = (newFiles: any) => {



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Most of my writing is about software. I enjoy summarizing and analyzing books and self-help videos. I am a full-time software engineer.