Comments by "Charles M." (@charlesm.2604) on "7 ways to deal with CSS" video.
-
13
-
11
-
11
-
8
-
6
-
4
-
4
-
3
-
2
-
1
-
@dangjoeltang Hard agree on your second point, although you can use nested styling with preprocessors like sass, that's what you have to deal with with an unopiniated library like React is (💩). But it definitely doesn't make it easier to read, it makes your component file confusing and hard to maintain.
People using React and putting everything in 1 file, like the interfaces, state management, event functions, etc... Are bad React devs (because it's a bad design since it gets ran everytime your the state changes) and are hated by their team.
If you want to use React you should create folder based components, with 1 file for the J/TSX, 1 file for the styling, 1 file for the functions and 1 file for the tests.
Or use another library if that's not how you want to roll.
1