Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Disagree on almost everything.
If I need to choose a tool for building UIs I probably pick React, Preact or Next JS if it suits best to the project (which will be almost always) I agree on that, but I don't agree with the reasons gived and the point of view of the post. Let me explain:
You can create complex UIs with Vanilla JS, webcomponents, React, Svelte, Vue, Preact, Angular, Next JS and so on, pretty easily tbh.
The main benefit of React is that it's the most used lib for building UI components therefore it's somewhat standarized so you'll get an easy time getting new hires that can understand quickly the code of a project.
By the way React itself is written in what you define as "plain old JavaScript" just like Preact and many others.
A framework or lib is never more powerful than the language it's built in/for, neither their aim is to perform best.
They're just opinionated standardization of automations on -opinionated- standard processes that may suit for a given project or not.
By that means React or any other lib or framework will not cover every single need you have. In such cases it's always better to understand the issue and to know how to solve it in the main language to avoid setting thousands of dependencies to the project that may eventually conflict each other or become deprecated, forcing you to either re-implement that given feature or forking and maintaining that dependency by yourself.
Yes, it was time to move into React some years ago and it's still the mainstream so you won't be wrong getting it -probably-. Just make sure you understand the scope of React and what it brings by itself as a lib and what is out of React boundaries that you'll need to solve with plain JavaScript.
Also not every React feature is OK to use on every project (see managed/controlled forms as example).
And yeah... Especially if using React hooks, you're still using a lot of "vanilla" js. That's why I prefer using React over something like angular that has a much steeper learning curve. React hooks is basically a collection of vanilla js functions with some awesome sauce on top :p
But yes, definitely there should be other reasoning to use React beyond: my UI is complex. There's a million frameworks that try to make it easier to develop complex UI.
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Yup but note that JSX is a way to write template structures, it does not compare to JS but HTML (or XSL/XSLT, XML, MD or any other markup language) and I'm pretty sure that the JSX to HTML parser is written in JS as well 😁
By vanilla js I also mean, not using framework specific constructs. For example, in React everything you write within a hook is vanilla js but the hook itself is a framework construct that doesnt mean anything outside of your React project. In angular a lot of what you write are angular specific constructs that wouldnt work if you copied them somewhere that executes vanilla js. That means the learning curve for the latter is much higher and also that the stuff you learn is not transferable to other places.
Disagree on almost everything.
If I need to choose a tool for building UIs I probably pick React, Preact or Next JS if it suits best to the project (which will be almost always) I agree on that, but I don't agree with the reasons gived and the point of view of the post. Let me explain:
You can create complex UIs with Vanilla JS, webcomponents, React, Svelte, Vue, Preact, Angular, Next JS and so on, pretty easily tbh.
The main benefit of React is that it's the most used lib for building UI components therefore it's somewhat standarized so you'll get an easy time getting new hires that can understand quickly the code of a project.
By the way React itself is written in what you define as "plain old JavaScript" just like Preact and many others.
A framework or lib is never more powerful than the language it's built in/for, neither their aim is to perform best.
They're just opinionated standardization of automations on -opinionated- standard processes that may suit for a given project or not.
By that means React or any other lib or framework will not cover every single need you have. In such cases it's always better to understand the issue and to know how to solve it in the main language to avoid setting thousands of dependencies to the project that may eventually conflict each other or become deprecated, forcing you to either re-implement that given feature or forking and maintaining that dependency by yourself.
Yes, it was time to move into React some years ago and it's still the mainstream so you won't be wrong getting it -probably-. Just make sure you understand the scope of React and what it brings by itself as a lib and what is out of React boundaries that you'll need to solve with plain JavaScript.
Also not every React feature is OK to use on every project (see managed/controlled forms as example).
Best regards
^ This.
And yeah... Especially if using React hooks, you're still using a lot of "vanilla" js. That's why I prefer using React over something like angular that has a much steeper learning curve. React hooks is basically a collection of vanilla js functions with some awesome sauce on top :p
But yes, definitely there should be other reasoning to use React beyond: my UI is complex. There's a million frameworks that try to make it easier to develop complex UI.
Everything in react in vanilla js except the jsx.
Yup but note that JSX is a way to write template structures, it does not compare to JS but HTML (or XSL/XSLT, XML, MD or any other markup language) and I'm pretty sure that the JSX to HTML parser is written in JS as well 😁
github.com/babel/babel typescript and javascript 😁
By vanilla js I also mean, not using framework specific constructs. For example, in React everything you write within a hook is vanilla js but the hook itself is a framework construct that doesnt mean anything outside of your React project. In angular a lot of what you write are angular specific constructs that wouldnt work if you copied them somewhere that executes vanilla js. That means the learning curve for the latter is much higher and also that the stuff you learn is not transferable to other places.
Totally agreed 👍👍👍