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?
-
-
Key order is based on insert order though, no?
-
I'm on this thread seeing if there's a css hack for drawing 6 perpendicular red lines, some of them blue, some of them transparent.
- 1 more reply
New conversation -
-
-
I personally would assume order didn't matter in an object (despite its being guaranteed), so I'd prefer something where it's obvious it would (like an array, or arg list). Maybe there's a way to change the style declarations so order doesn't matter anyways.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It's a real shame JS doesn't have scoped module opening. Then it'd be convenient to use plain identifiers inside of an array (rather than object literal keys): https://github.com/reasonml-community/bs-react-native/blob/4c4abd5aa8cd95ff44d052a6c98261b3d5ac91ef/example/src/pages/ViewExample.re#L5-L20 …
-
If only `with` worked in strict mode
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 