Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
10Dev28534yI agree with all except the es5 thing. es6 made js a truly functional language, and made it so much easier to work with
-
I’ve gone from liking BEM (with Sass) to disliking it as it gets messy with media queries. I’m probably doing something wrong though...
-
jaylord4514yFrontend development is really not just web based you know 🙃 i feel a little offended here
-
@black-kite in sass you can directly use the @media at the current nested level. Use mixins to shorten and generalize some queries. Also better for readability. I usually don’t care at what min-max width you break your viewports.
-
DOM isn't hard, it's tedious, if you use same value at multiple places, and want to change it, you need to keep track of all, React states make it easy, it makes life easier.
-
ES6 was the dipping sauce to ES5. Quite a bit of syntactic sugar but game changing nonetheless.
-
MM8312244yES6 was a much bigger leap than 5 and most of it is great, give or take the odd exception (you know who you are, classes). Flexbox also solved pretty much all of the age-old problems with CSS.
-
Just looked it up and Promises were introduced in ES6 not ES5 like I thought. I now change my statement, ES5 was the appetizer and ES6 was the entree.
-
@petergriffin If MS had poured the same amt of investment in JSDoc as it has in TS, it would definitely be there.
@jkommeren, I know but most of my rant was about FE techs so :)
@theabbie True, can be tedious.. But when you need direct access to the DOM from within React, can be a pain in the ass just as much (passing refs across comps, creating 'portals', accessing native events).
@10Dev if by "functional" you mean "more pleasant to work with for/ more familiar to devs coming from other backgrounds", yes, else no. ES6 added some functional features (iterator, generator), but also all but buried function scoped variables (var), IIFE's and prototypal inheritance under classical OOP (classes, block scope). Early versions of Babel implemented & polyfilled ES6 completely in ES5, a testimony that most of what ES6 does could already be done with ES5, be it in a (subjectively) less DX-friendly way. -
yeah fuck CSS-in-JS. Makes media queries weird. In one project i had to deal with that, and we ended up rewiting it into CSS with custom properties, which inturn were managed in one style_config.css with :root{...}
Client wanted to change Navbar to blue? No Problem:
--navbar-bg: #4f4fff;
done.
Different font? Don't worry:
--content-font: "bla", "bla", "bla";
done.
No fuckery with some files in some functional component or stuff like that
Related Rants
The longer I work on front-end the more controversial my opinions become:
- Styling a button with display:flex is dumb.
- The DOM is not hard, unlike what the React team wants to have you believe.
- Specifying a <form> action matters, even if it's empty
- ES5 was the real JS revolution, ES6 mostly sugar-coated marketing
- Disciplined BEM (S)CSS is simple and flexible enough for most needs (vs CSS-in-JS, CSS modules)
- If editor support for Jsdoc were as advanced as Typescript, you wouldn't need the latter.
- There are cases where using floats and inline-block displays is better than the flex CSS box model
rant
controversial
css
front-end
bem
javascript