I decided to focus on React as my main #frontend framework. It's lightweight and as near to JavaScript as a framework can be. It allows me to follow most of the standards and good practices. It helps me to use new methodologies like #componentization or #CssInJs. It has a rich ecosystem of tools and libraries and clearly is the main web framework nowadays.
which option have you chosen for 'CssInJS', 'JSS' or 'Styled-Components' ?
I have chosen the Styled Components option. I find it more natural to use and easy to learn, mostly coming from Sass. Migrations of your old Sass styles looks easier too. And you have a clean separation between the component styled and the functional component.
yeah, but won't it be an overburden to wrap every component or even a simple <div> tag which needs styling?
As I understand it, you need an HTML element to apply styles to it, so at the end, you have a "div" with styles wrapped inside another component that implements the behavior of the group. Even if the wrapper returns an only component (the styled one), you can use a "fragment" to return only the "div" of the styled component. Imagine the case with a button that has the "handleClick" logic that renders a fragment with a "StyledButton" component that receives the "handleClick" method trough properties. It's like having a normal button but styled. But correct me if I'm wrong.
Back in 2015, my company had a back-office dashboard that was originally built in AngularJS 1. Since Angular 2 presented drastic changes we decided to rethink the options and we looked at React and Vue.js. Besides, at the time, Vue had basically only one developer, its structure (100% oriented to components) and also its backward compatibility focus (Angular 1 to 2 no more) we preferred it against React cause it seemed more straightforward, clean and with a small learning curve. Now 4-5 years later we are very happy with our choice.