Want to clarify a common misconception that JS does not have a guaranteed property order. It does. In fact it was standardised in ES2015. Before that it was a pseudo-standard among most engines. See https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys …
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Is the key order guaranteed? https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order …
-
That SO question is very wrong. JavaScript has guaranteed object property order for years.
- 2 more replies
New conversation -
-
-
I'm hiding some higher abstraction we have. It's more like: styles({default: true, active: isActive}); Where `active` and `default` are a bunch of CSS rules.
- 5 more replies
New conversation -
-
-
JS objects do not guarantee order (arrays do) and should never be treated as an ordered collection. It’s not about if it works or implementation, it’s about the assurances and affordances of the language.
-
JS has had a guaranteed object property order since ES2015 and before. See https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys …
- 6 more replies
New conversation -
-
-
might as well go back to regular scss, and learn how to manage it properly / use css-modules / use css-blocks
-
Thanks for your take but it's unrelated to the question I'm asking. There's a lot more rationale that isn't obvious from this tweet.
End of conversation
New conversation -
-
-
Seems like a boolean trap. I'd say it's a pattern to avoid regardless because the behavior can't be inferred by reading the code.
-
Not sure I understand what you mean? Context: https://fburl.com/4maelwithlove
- 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 