mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 22:02:24 -06:00
[GH-ISSUE #109] PropTypes not set correctly #67
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vikkio88 on GitHub (May 5, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/109
Hi guys,
you did set proptypes on components as follows
ComponentName.PropTypesbut that is not the correct syntax, as it should be lower camel caseComponentName.PropTypes, so passing the wrongpropTypesis not throwing any warning for me, nor is auto-completing on my IDE@mischnic commented on GitHub (May 5, 2018):
proton-native checks them (not React):
d37dae1299/src/components/DesktopComponent.js (L54-L59)And it does work:
->
@kusti8 is there a specific reason you did it this way ?
@vikkio88 commented on GitHub (May 5, 2018):
it would be nice to make adopt the same standard as react, dont you think?
https://reactjs.org/docs/typechecking-with-proptypes.html
@kusti8 commented on GitHub (May 6, 2018):
It's because when
createElementmakes a class, the React system does not know about it so it doesn't check props. React only checks props on React components, which the base components are not. I'll change the name to be more in line with React standards, but if you remove the checkProp line, then it doesn't work.