Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve prop validate warning for frame prop in SSR apps by matching prop-types with ts types #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

labithiotis
Copy link

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

@labithiotis
Copy link
Author

@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.

@labithiotis
Copy link
Author

@sarink Is there any way I can help to get this merged? Otherwise, I will fork and deploy my own library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant