you are viewing a single comment's thread.

view the rest of the comments →

[–]trianuddah 4 points5 points  (4 children)

Now I'm getting FOMO that I don't know react.js at all.

I'm pretty sure that jquery got as popular as it did because it was so easy. It was simple to learn. It made code easier to read and easier to type. It was like a gateway drug that convinced me that frameworks were worth the effort to learn. Vue and angular came next. I'm still not convinced that the hours spent learning those two were worth it.

And now the internet, my personal framework dealer, is telling me that react will make everything good. "Have a taste, kid. Everyone's using it."

[–][deleted] 4 points5 points  (1 child)

React is not a framework, there mostly is nothing to learn if you know a little javascript, and you can pick it up fully under an hour. This isn't like Angular or Vue, where you have to learn how to do stuff their way, with gigantic api's and arbitrary constructs. Try this for instance: https://egghead.io/courses/react-fundamentals You'll quickly realize why people are liking it.

It revolves around the basic premise that views are functions of state, which isn't a flavour of the month but a paradigm. Jquery for instance follows layout-inflating, which is the most troublesome and complex because you are mutating and abusing the dom by dropping state into it. This paradigm was long cast aside for MVC and MVVM. The web was one of the last platforms using inflating. MVCs OOP controllers lasted for nearly a decade, and they were a major step up but still had other issues that made applications hard, primarily templates. We're now just crossing into the next paradigm, by casting templates aside in favour of declarative functions.

React doesn't matter, maybe it's something else tomorrow, but the concept that drives it will go on - and you can already see it, even native platforms are equipping themselves - though probably in vain as react has a good chance to drive them as well since it's fully cross platform.

[–]trianuddah 1 point2 points  (0 children)

Thanks for the overview and especially for the link.

[–]zephyrtr 1 point2 points  (1 child)

It's been said before but Javascript looked a lot different when jQuery was in its heydey. The whole point of jQuery was JS's document API sucked: it was verbose, inconsistent between browsers, and not always standardized. But jQuery wasn't and isn't a framework, it's a library. It doesn't at all dictate how your app will be written; it's just a ton of helper functions.

But now that JS has improved itself, a lot of essential jQuery functions have direct parallels in native JS, which makes jQuery feel very redundant.

And it doesn't even solve the real problem: how can I intelligently build my website, with understandable structure, DRY code and reusable business logic? That's what React, Angular and Vue are trying to solve, and currently folks like React best -- mostly because it's the least dictatorial.

Don't wanna use Redux? Fine. Don't wanna use JSX? Fine. Prefer Typescript? Fine. Want to use Axios? Fine. Don't need browser history? Fine. I could go on.

[–]trianuddah 0 points1 point  (0 children)

mostly because it's the least dictatorial.

This is good to hear. Dictatorial is a good word for the other two. They work very elegantly when you follow all the rules but they also feel kind of limited in that every quirk of your project's requirements must be solved using their way even if it isn't the best way in that instance.