Remix.run Logo
lr4444lr 15 hours ago

React piles concepts into your mental backpack: rendering models, hooks, state libraries, routing, and a build pipeline. ... The simple alternative is just around the corner: sprinkle vanilla JavaScript where it’s needed and don’t build your identity around a framework

Yeah, except that a sprinkle becomes a dusting, and then a dusting becomes a coating, and then a coating becomes a clog of dust bunnies, and it's often hard to tell when you need to stop and do it a better way when the business side is pressuring you with deadlines for changes on "what already works".

The whole reason frameworks exist is to _reduce_ the mental backpack by using something that has solved the same problems in the same orderly way.

PaulHoule 13 hours ago | parent | next [-]

I'd argue the whole point of React is to enable the modularization of components written in Javascript.

I realized as soon as 1997 that if I wrote some component in Javascript I wanted to stick into a web page I might want to stick two or three of those into a web page and to do that I have to keep the state for those separate, be able to reference the form elements (didn't have access to DOM elements!) with a unique name, etc.

React goes past that and lets you nest components into other components. In some point that's "managing complexity" and not "introducing complexity", except for the fact that when you can easily incorporate 35 third party components into your application that is 35 components each of which introduces its own complexity of one kind or another -- some of the complexity of "modern Javascript" is the complexity of the build system and the framework, but the build system and framework system let you build bigger systems that have bigger problems.

pixl97 13 hours ago | parent [-]

Software is a Jeavons paradox. When you use a library (time efficiency) you are compelled to add more features (complexity)

politelemon 11 hours ago | parent [-]

It insists upon itself.

motorest 10 hours ago | parent | prev | next [-]

> Yeah, except that a sprinkle becomes a dusting, and then a dusting becomes a coating, and then a coating becomes a clog of dust bunnies, and it's often hard to tell when you need to stop and do it a better way when the business side is pressuring you with deadlines for changes on "what already works".

The ultimate step into irony is reaching a point where, to justify their approach, they claim that it's ok to spend all this time reinventing JavaScript wheels because all this "sprinkle-on" JavaScript can be packaged and reused in other projects.

osigurdson 15 hours ago | parent | prev [-]

I'm glad they at least had the bravery to provide a concrete example of what they mean by "complexity". Clearly their example of "React = complex" vs "JavaScript = simple" is actually a fairly controversial take. Does "simple" mean "better", if not, I think we should be chasing the latter.

politelemon 11 hours ago | parent [-]

I'm not even sure it's a controversial take, more of react devs (don't worry, myself included) feeling called out and getting defensive instead of trying to understand something simple.