sarink / react-file-drop

React component for Gmail or Facebook -like drag and drop file uploader
https://www.sarink.net
176 stars 54 forks source link

Props Warning #83

Closed proffnick closed 2 years ago

proffnick commented 3 years ago

I followed proper installation guides but receive this warning in console:

index.js:1

   Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

Please update the following components: FileDrop

This is my code: <FileDrop onDrop={processDroppedFiles} onTargetClick={onTargetClick} className="kpFilesDrag position-relative p-5 rounded-3"/>

How do I fix it?

proffnick commented 2 years ago

I have not been able to resolve the issue. I am guessing they will have to update the package to resolve the issue, however, if I am able to find a way around it, I will get back. For the meantime you may like to remove react from strict mode. Nicholas Mberev Director: Amtel WEb Design & Graphics Technology. Websites Design, Graphics Design, Search Engines Optimization, Web Portal Creation, Web Hosting, Domain Registration, Bulksms etc. : Contact: +2348133191426 Websites: www.amtelwebsitedesigner.com Emails: @. @.> * @. @.>

On Wed, Dec 1, 2021 at 2:19 PM Software Engineer @.***> wrote:

Hi, How are you ? Now I am using 'react-file-drop' module, but I had same error with you. So if you solved this problem, please let me know. Thank you [image: image] https://user-images.githubusercontent.com/72724141/144241412-6a4b430d-7ec1-42d8-90f4-20cfb012a4ca.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sarink/react-file-drop/issues/83#issuecomment-983633294, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATMHVZT2Y25LFTUQZRUGLK3UOYOELANCNFSM5H3FTCMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sarink commented 2 years ago

Updating this library to use hooks instead of lifecycle methods is on my to-do list. Until then, you'll have to disable strict mode or ignore these warnings :-/