How to use material ui dropzone into my react with typescript application?

Button on click should open the mui dropzone which helps me import files.

I tried adding the components from but it does not work and provides the below error.

const DropzoneDialog: React.ComponentType<DropzoneDialogProps> import DropzoneDialog 'DropzoneDialog' cannot be used as a JSX component. Its element type 'ReactElement<any, any> | Component<DropzoneDialogProps, any, any> | null' is not a valid JSX element. Type 'Component<DropzoneDialogProps, any, any>' is not assignable to type 'Element | ElementClass | null'. Type 'Component<DropzoneDialogProps, any, any>' is not assignable to type 'ElementClass'. The types returned by 'render()' are incompatible between these types 
7

Related questions 717 What is the type of the 'children' prop? 783 When to use JSX.Element vs ReactNode vs ReactElement? 1590 How to convert a string to number in TypeScript? Related questions 717 What is the type of the 'children' prop? 783 When to use JSX.Element vs ReactNode vs ReactElement? 1590 How to convert a string to number in TypeScript? 250 ReactJS and Typescript : refers to a value, but is being used as a type here (TS2749) 2 Type error: This JSX tag's 'children' prop expects a single child of type 'ReactNode', but multiple children were provided 1231 How do you explicitly set a new property on `window` in TypeScript? 1 Theming react app typescript using MUI version 5 Load 4 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like