3 ms·
Unfortunately like “jQuery developers” a decade ago, we now have “react developers” that don’t understand CSS and add more divs until they get the result they w
by nailer 3y ago
Unfortunately like “jQuery developers” a decade ago, we now have “react developers” that don’t understand CSS and add more divs until they get the result they want.
A modal log in screen is five elements: a shade, a dialog, two labels, two inputs and a button. These are all very easy to name.
Not 300 unnamed divs. The react developer adds divs and then considers it difficult to name them all.
- ricketycricket 3y ago> A modal log in screen is five elements: a shade, a dialog, two labels, two inputs and a button. These are all very easy to name. Agreed. But why name them at all if the structure is so simple? Keep your simple, understandable structure, colocate your styles with tailwind classes, and avoid the unnecessary cognitive overhead of naming obvious things (is it .username or .user-name?) and linking them with remote styles in a different file. Not saying it’s the “one true way”, but I don’t think your way is necessarily simpler.
- nailer 3y agoUnnamed would be great if it was just inline styles. Just not 34 class names per element in a custom DSL plus other rules to get around DSL limitations, plus additional wrapper divs because the developer does not know CSS, which is my experience of tailwind projects (including one from YC).