-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Creating a Checkbox or Modal emits an error in the console when using Preact #1869
Comments
@rbscott Thanks for report. However, you're right, PReact isn't officially supported. Help there is much appreciated. Warnings are come from AutoControlledComponent, but issue is quite strange. |
PRs increasing interop with other libraries are very much welcomed. Closing for housekeeping as there are no errors with React and this library is intended to be used with React only. |
In case it is of help, these are errors for developers that are only logged when |
@levithomason thanks for the info. It looks like preact removes prop types for all builds. There is a PR to change this behavior so it only removes propTypes during production builds. I believe this will resolve this issue. |
@rbscott preact-compat is the solution you are looking for. |
Steps
npm install --save semantic-ui-react
Sample code:
Checkbox is missing "defaultChecked" propTypes validation for auto controlled prop "checked".
Checkbox is missing propTypes validation for auto controlled prop "checked".
Checkbox is missing "defaultIndeterminate" propTypes validation for auto controlled prop "indeterminate".
Checkbox is missing propTypes validation for auto controlled prop "indeterminate".
Expected Result
No errors are emitted.
Actual Result
4 errors are emitted.
Version
0.71.1
Testcase
Repository is pretty barebones, but had to make a separate project in order to demonstrate the issue.
https://github.com/rbscott/auto-controlled-error
Notes
I am not sure if Preact is official supported, but it seems to mostly work. If someone points me in the right direction, I could put together a Pull Request.
The text was updated successfully, but these errors were encountered: