You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve noticed that many if not most boolean props in this library default to true. For example, in <Box />, all of the props except padded default to true. This makes it more difficult to adjust their values. For example, to render a horizontal, invisible box, you need to do this:
<Boxvertical={false}visible={false}/>
However, if the API was changed to use false props by default, this could be written this way instead:
<Boxhiddenhorizontal/>
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?
The text was updated successfully, but these errors were encountered:
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.
I’ve noticed that many if not most boolean props in this library default to
true
. For example, in<Box />
, all of the props exceptpadded
default 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
false
props 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?
The text was updated successfully, but these errors were encountered: