4 ms·
It isn't so much pre-mature optimization rather than having the next step of the evolution of modern webdev. Let's go back 6 years in webdev land. jQuery was
by snarkyturtle 10y ago
It isn't so much pre-mature optimization rather than having the next step of the evolution of modern webdev.
Let's go back 6 years in webdev land. jQuery was king, Angular was the up-and-comer. You have a fairly complex jQuery site probably rendering most things from ruby or php. The only way to debug it was with console.log and refreshing the page.
Angular comes around introduces modules and unit-testing, cool! You hook up grunt and protractor, you install angular batarang. Everything is good. But you end up building this huge angular app. You try to debug this edge case when you have this panel open under this tab. You get frustrated that you have to click on the same things over and over again. Livereload can inject css but not js. When you change the html of your angular directive you have to reload the page too.
This is where React comes in. React + Redux + Webpack makes it such that you can apply livereload to _everything_. The css that your component imports, the html it renders, what actions happen when you click a button. Everything. It's not necessarily the new shiny rather than just the next step to making things easier for devs. It gets out of your way so you could focus on styling, structure and business logic.
- riquito 10y ago> It's not necessarily the new shiny rather than just the next step to making things easier for devs It's more testable, maintainable and reusable, but easier certainly not.
- liamzebedee 10y agoExactly! Not to mention the reusability benefits of components - rather than passing around JQuery selectors and objects. The cognitive load of using plain React is unparalleled for me. The effort to setup the tooling is a bit of a hassle though..
- cel1ne 10y agoAnd the next logical step for styling IMHO is using tachyons.css, or the port: react-native-style-tachyons. It frees you from the organsation of a stylesheet and from having to find widths, heights, paddings, margins and font-sizes that work together.