简体   繁体   中英

antd image upload Need to convert class based component into react -hooks and unable to increase the width and height of image

I am facing this issue. I have attached the code and error and CodeSandbox link.

Tried to fix the issue in various methods and ways but it's not fixing. I am not able to know why it's getting an error I don't understand the exact issue in the code. Could anyone help with the solution?

https://codesandbox.io/s/infallible-darkness-g1ge3

I think I got it to work: https://codesandbox.io/s/hungry-forest-dur6r

there were many small errors, you might want to compare with your original code to figure it out by yourself:)

@berin

Can u help to try that method using this method: https://github.com/JakeHartnell/react-images-upload

Need to follow this pattern

The image url in index zero of that array is the primary image.

Use a drag and drop React lib to sort the images (your choice on the React lib)

In regards to the UI, an 'add image' button should be displayed if there are less than four images.

There should be a delete icon overlay on each image so that a user could remove an image. hi this need to be achived using图片检查一下

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM