An Interest In:
Web News this Week
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
Why I like React?
I like React
I use React because I like React.
But some people use Vue because they like Vue, and some people use Angular because they like Angular.
What I like about React is that I can write JavaScript based UI.
HTML base or JavaScript base
The application code can be built and put together as a JavaScript bundle file.
Once put together, they are all pretty much the same.
However, there is a difference between Vue.js/Angular and React in terms of how the transpiler interprets the source code before it is put together. There are.
In Vue/Angular, HTML is written as Template and is separated from Script.
Because Template and Script are separated, the work of linking UI and processing is done by the transpiler.
- Use
hoge-key
in HTML because the naming of attributes isn't case sensitive. - JavaScript is case sensitive and basically uses
hogeKey
.
The transpiler combines these.
In React, on the other hand, both the UI code and the processing code are written in the same JavaScript.
Since the JSX code is JavaScript, there is a direct connection between the declared processing and the UI.
The increase in React users at the same time that TypeScript became popular was probably due in part to the fact that the UI code can also be covered by TypeScript, making it easier to benefit from TypeScript.
But, I think that Angular/Vue are good, too.
The method of implementing Template and Script separately is similar to the traditional way of implementing an application with SSR.
I recognize that this was also the case with JSP.
Therefore, for those who have done a lot of SSR application development, Vue/Angular is easier to use.
So I don't think React is the only way to go.
I think everyone has their own ideas.
Librarys or Frameworks
React/Vue are UI librarys.
Angular, on the other hand, is a framework.
In React/Vue, the library itself consists of the minimum content to implement UI.
Therefore, it is necessary to install derived libraries according to the use.
Angular is a framework, so it is full of various libraries from the beginning.
Summary
- Reasons for liking
- Can write JavaScript based UI
- Make more use of TypeScript
- Can be made in the smallest configuration.
Original Link: https://dev.to/yukikmt/why-i-like-react-22me
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To