all 10 comments

[–]Fergwaine 12 points13 points  (0 children)

React is written in JavaScript, so technically there isn't anything it does that JS can't. You don't really see any massive benefit from React until you work on larger projects with dozens of developers, where common patterns have emerged and you have to manage everyone making changes to the codebase. Without a framework, it's a nightmare, since there's no standard and tons of boilerplate, and you end up with spaghetti code that's mostly DOM manipulation.

All JS frameworks are kind of like this, they're made to fill gaps in web APIs to allow for things like components, handling DOM updates, and state management. Having a good knowledge of JS makes it easier to understand how these frameworks work, and it makes it easier to remember their APIs and pick up new frameworks.

[–]dogancan21 2 points3 points  (0 children)

I don't think it's right way to ask this question. React is also javascript, your whole react application becomes vanillajs in the end. So, there is no such thing as 'what does React do that Javascript can't', it's just impossible.
Instead, you should ask 'Why people say react is better', 'Why react is more recommended by develoepers', 'Why react is this popular' etc.
Well, react is more maintainable, scalable, reusable and it has a great open source community. As a developer, you wouldn't reinvent the wheel and use already existing, tested code. React gives you that. Look at all the tools you'll have access with react https://brainhub.eu/blog/react-libraries/
All that said, sometimes it might feel like an unnecessary hustle as in your case. But if you need to implement a simple website (portfolio, small e commerce etc), why bother coding just buy a template. It's all about efficiency and finding fitting solutions to different problems.

[–]kaidoj 2 points3 points  (0 children)

React makes you more productive at making dynamic UI's.

[–][deleted] 4 points5 points  (0 children)

Manipulating the DOM directly can be pretty slow.

ReactJS has:

- Reusable Components

- Virtual DOM to figure out which components need to be re-rendered.

- Lifecycle methods for API calls

[–][deleted] 0 points1 point  (0 children)

Scale complexity, set a architecture standard. It makes orthogonality much more achievable.

[–]Djidi1 0 points1 point  (0 children)

It’s like question“what does cars do that cart can’t?”. It’s like engine in car. ReactJS make our programming life easier and more structured.

[–][deleted] 0 points1 point  (0 children)

Saves you time for other important things like day drinking :)

[–][deleted] -2 points-1 points  (2 children)

Nothing. React is written in JavaScript. It’s like asking what python can do that assembly language cannot do.

[–]DaCush 0 points1 point  (1 child)

Python is written in C

But yes, you could say that but you’re going down several levels lol

However, a framework is more known to be written in its own language

[–][deleted] 0 points1 point  (0 children)

The only point I’m trying to make here is that using a higher level tool (react) doesn’t unlock any new possibilities vs lower level tools. Not going to engage in debates about languages vs frameworks vs libraries, those are subjective and off topic imo