The whole CSS in JS thing is so backwards. I use React a lot and I love it, but styles stay in a css file structured using BEM. It works.
I thought the same thing until you start to think in terms of “constraint-based components”, which are more easily done in CSS-in-JS. Styling is done by passing properties to a component, e.g. , and only the developer building the primitive component needs to worry about styling. You end up being able to rapidly develop interfaces that match the designs.
10 years of Front end Development. I quit
41–50 of 50 posts
Re: 10 years of Front end Development. I quit
#42backend dev here. mainly python/flask. question: if I really wanted to start frontend this year, where would I start? recommendations?
Re: 10 years of Front end Development. I quit
#43 import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
const MyButtonClasses = makeStyles({
root: {
background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
border: 0,
borderRadius: 3,
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
color: 'white',
height: 48,
padding: '0 30px',
},
});
export default function MyButton() {
const classes = MyButtonClasses();
return MyButton;
}Re: 10 years of Front end Development. I quit
#44Let's rewrite the same example and change the variable names, I think it make more sense now. import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; const MyButtonClasses = makeStyles({ root: { background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)', border: 0, borderRadius: 3, boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)', color: '…
Re: 10 years of Front end Development. I quit
#45Re: 10 years of Front end Development. I quit
#46Lol, dude. A few years before publishing React, Facebook hired basically all Mootools developers who would join, which were among the few people taking big javascript applications seriously before "frontend development" was a thing.
Re: 10 years of Front end Development. I quit
#47I sympathize. The state of front end dev is in no small part why I wrote intercooler and, now, work on htmx: http://htmx.org It's crazy how unnecessarily complex everything has become.
Re: 10 years of Front end Development. I quit
#48I sympathize. The state of front end dev is in no small part why I wrote intercooler and, now, work on htmx: http://htmx.org It's crazy how unnecessarily complex everything has become.
Glad to hear it's still going! Does this represent a lot of change from Intercooler? Why a new project instead of integrating it to Intercooler?
Originally I chose kutty, which means, roughly, "sweet" in american slang, but that had too many other meanings, including a very unfortunate meaning in dutch slang.
Re: 10 years of Front end Development. I quit
#49The current iteration of React with hooks, fibers, synthetic events is a tirefire. There's a lot of `It's Facebook so it must be good` hype without questioning whether all that complexity even makes sense.
Gzipped React + ReactDom = ~50KB. Unzipped is ~200KB. That's nuts and plain inefficient. A low powered device will take half a second to load and parse that crap before it even does a first paint.
If you care about performance, React is no longer the tool. Svelte and Preact (4k gzipped) are way better alternatives.
Stay away from it. If it's a simple app/web page, just use vanilla js. The core DOM API has good cross browser compatibility nowadays. You don't even need jQuery.
React is a jack of all trades but master of none. Don't equate Frontend Development === React.