mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #82] Adjust prop naming conventions and defaults for easier use with JSX #51
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#51
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 @j-f1 on GitHub (Apr 13, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/82
I’ve noticed that many if not most boolean props in this library default to
true. For example, in<Box />, all of the props exceptpaddeddefault totrue. This makes it more difficult to adjust their values. For example, to render a horizontal, invisible box, you need to do this:However, if the API was changed to use
falseprops by default, this could be written this way instead:This saves on typing (no
={false}) and is clearer IMO since you specify which features to enable, instead of which ones to disable.What do you think?
@kusti8 commented on GitHub (Apr 22, 2018):
Seems like a good idea, but to change the name, I have to create an object mapping to translate it into libui terminology which I would rather not do since it can get really unwieldy.