Don't use object key/values for conditions
when using defineProperties
from "@vanilla-extract/sprinkles".
#1109
alex-mcgovern
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Interesting point. I totally can see your point of view but I'm not sure everyone would agree with the statement "an object implies that ordering is not important." The spec certainly doesn't. I think automatic "object key sorting" is highly debatable and I certainly would not add it to my codebases. That said, allowing Maps in place of objects in those APIs wouldn't hurt. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Use of an object implies that ordering is not important. Was recently stung by this when introducing sorting of object keys into a component library codebase, which broke responsive sprinkles conditions. If ordering is important here, I would expect something like an array of tuples or a map.
Is just a suggestion, but I think the mental model would be more clearly understood. :)
Beta Was this translation helpful? Give feedback.
All reactions