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
-
I see where you are coming from, we using react native at our company and we have an internal library of 50+ components.
But I do sort of like this, it means every component and its functionality is isolated away and easier to debug.
I've not done much work in plain react before, but instead of a separate stylesheet.css file we use the react-native inline styles. So they are declared in the file without css! -
trogus131608y@Michael-Hancock nice, haven't had a chance to do react native yet, it's just web at work.
The killer is going through in chrome, seeing something that needs changing, inspect with chrome dev tools, and I can't just quickly copy/paste to search for that class name to change the css, I have to search for the associated filename, but there is the base .js and .css files with the same name that make up the component, so pick the right file and then find the class I was looking for. A few small changes to the same page can involve a handful of different components, and all those extra seconds add up. And my IDE now has a dozen files open, so back and forth between files and I'm juggling to remember which thing was in which component... gets to me some days -
tytho23148y@trogus that's rough... Are you using the react devtools extension? or CSS modules by chance?
React is a nice js framework, but I constantly find myself with 50 different files open because every component and related css file is spread across the world. I get why our frontend guy built it with so many modular components, but it makes me feel like back in the day when libraries were a thing and you had to flip through those giant Dewey decimal system drawers of cards to pull out the one little card you want to then hunt for that one little book you wanted to find that one little line from
undefined