Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

dropzone react npm

import React, {useCallback} from 'react'
import {useDropzone} from 'react-dropzone'

function MyDropzone() {
  const onDrop = useCallback(acceptedFiles => {
    // Do something with the files
  }, [])
  const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop})

  return (
    <div {...getRootProps()}>
      <input {...getInputProps()} />
      {
        isDragActive ?
          <p>Drop the files here ...</p> :
          <p>Drag 'n' drop some files here, or click to select files</p>
      }
    </div>
  )
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: string contains js 
Javascript :: get text selection javascript 
Javascript :: how to check if a user sent a message in discord js 
Javascript :: regex more than one character 
Javascript :: normal function vs arrow function in javascript 
Javascript :: interpolation react 
Javascript :: nodejs curd insert update delete 
Javascript :: react effect hook 
Javascript :: using while loop to create table rows js 
Javascript :: how to use aos 
Javascript :: get the key of largest json array value 
Javascript :: difference between var, let, const 
Javascript :: invert linked list js 
Javascript :: image uploading using formdata 
Javascript :: picture in picture remove from videojs 
Javascript :: link externo no react 
Javascript :: Reactjs cant find serviceWorker.js file in app src folder 
Javascript :: reactjs wait for image to load from url 
Javascript :: array.find 
Javascript :: canvas set line opacity 
Javascript :: remove property from object javascript 
Javascript :: image file upload in angular 
Javascript :: Sum of Polygon Angles in javascript 
Javascript :: convert string to integer javascript 
Javascript :: decrementar en java 
Javascript :: react axios POST using async await method with super constructor parent class 
Javascript :: ffmpeg thumbnail generator SIZE 
Javascript :: javascript create a multidimensional array 
Javascript :: javascript 
Javascript :: javascript how to convert string to number 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =