DEV Community

Discussion on: Tell me an unpopular software opinion

 
scott_yeatts profile image
Scott Yeatts

First: SPAs and React are not synonymous. I do need to make clear that the SPA design pattern will probably never go out of fashion, but Angular, Vue and React (with the appropriate routing libraries added in) all provide a SPA experience.

I'm definitely basing my opinion on previous cycles, but there ARE objective reasons and parallels.

JQuery is still a powerful library that is still in use today (As we see in these comments). I feel certain that will hold true for React 10 years from now.

JQuery saw its "necessity" eroded by the evolution and adoption of its central features into the W3C spec. The things that forced you to need jQuery became native JS.

React is beginning to see that as well. Web Components eliminate the need for React as a means to separate concerns in your code. Just as document.querySelector and the DOMContentLoaded event replaced core jQuery functionality, you're starting to see Svelte and Stencil fill the component gap by offering solutions using spec-compliant web components (Stencil is WC first vs Svelte as an optional compile-target). You COULD do without either, but they give compile-time convenience and abstraction of boiler-plate that is impossible to ignore.

That's my biggest "objective" idea about React and the other current frameworks. The idea for these frameworks was born over 10 years ago with Angular. It was a reaction to jQuery and how, no matter how easily you could traverse the DOM, there was no way to create a simple custom HTML-tag that could easily import a new component. It wasn't part of the spec, so people created it. Now, a decade later, it IS part of the spec, but people really like the habits they've developed over the last decade haha.

That said: The EXACT same things about "economic" dominance have been said about JQuery, PHP, Java, C, FORTRAN, and a million other languages/frameworks. I just don't think it holds-up in the face of history is all. Just like there is a ton of work in the industry today and for many years to come in Java and PHP, I think React will see the same slow decline over the next decade that jQuery, Java and PHP have. (Note: Java's decline from number one by an astronomical margin to sometimes number 2 is STILL a decline... don't @me LOL)

That's just my (unpopular) read on the situation. I won't feel a bit sheepish if I look back on this post a decade from now and React is widening its dominance over the market and no one learns vanilla JS anymore haha. I just don't think its "necessity" now is anywhere near the same as it was in 2015 or even 2019, and that will cause a decline in use in the next few years as people start getting tired of using the new "hooks" or other FOTM they decide to introduce as a reaction to new innovation in the marketplace.

Thread Thread
 
jkhaui profile image
Jordy Lee

Thanks a lot for the great reply - that was very insightful and I definitely learned something. Particularly the part about web standards: I'd heard it before (how frameworks are basically a faster way to iterate with proposed web standards), but hearing it again helps me see the bigger picture.

I still think if we were to see a decline in React usage it would be a long way off. But your comments highlight the importance of diversifying one's skillset and keeping up-to-date with other technologies, so thanks for that

Thread Thread
 
steveblue profile image
Stephen Belovarich • Edited

Another reason React will decline is the baseless assumption that "DOM is slow". There will always be something faster that comes along.