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?
-
-
I think it is OK if you explain it somewhere and people are informed. I had a nasty time understanding how multiple spread properties would affect a React component. let a = {color:’blue’} let b = {color:’red’} <Comp {...a} {...b}/> The answer is blue.

-
Umm no. Later value would overwrite the previous one.
- 2 more replies
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 