react-file-drop
react-file-drop copied to clipboard
Resolve prop validate warning for frame prop in SSR apps by matching prop-types with ts types
For SSR apps I would see a console warning about the frame prop being null, but according to TS types frame can undefined and for SSR it's expected to be undefined. Therefore this PR just updates the prop-type validation to be optional and checks prop is an instance of an element.
The error I was seeing:
Warning: Failed prop type: Warning: Required prop `frame` was not specified in `FileDrop`
at FileDrop (/node_modules/.pnpm/[email protected]/node_modules/react-file-drop/FileDrop.js:24:24)
at SideUploadButton (./UploadButton.tsx:16:46)
at div
at div
at Side (./Side.tsx:35:17)
at div
@sarink Hope you're well, I am just checking if you saw this PR or if there's someone else I should nudge to get it reviewed.
@sarink Is there any way I can help to get this merged? Otherwise, I will fork and deploy my own library