Relying on object property order for a styling API. Good or bad? eg. styles({ backgroundBlue: true, backgroundRed: true, }); In this case the background would be `red` as it appears last. Relying on property order feels gross but can't think of a better API?
Not sure I understand what you mean? Context: https://fburl.com/4maelwithlove
-
-
I'm one week away from my yubikey
what I meant by boolean trap is that those values should be a blue/red enumeration rather than a true/false boolean of each possible values -
As for more complex cases (like focused/active), I'd say that the order of the keys shouldn't affect the outcome. The component should instead enforce the order they are applied based on its expected (and documented?) logic (like "focus overrides the active state")
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 