npm install --save semantic-ui-react<Form>
<Form.Checkbox label='Why the errors?'/>
</Form>
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".No errors are emitted.
4 errors are emitted.
0.71.1
Repository is pretty barebones, but had to make a separate project in order to demonstrate the issue.
https://github.com/rbscott/auto-controlled-error
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.
@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 NODE_ENV !== 'production'. We check that the Component.constructor.propTypes include the necessary keys for the component. Preact must be doing something to the propTypes so that some are missing. Namely, the default* propType for checked and indeterminate.
@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.
Most helpful comment
@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.