Why React? 5 Reasons to learn/love React
Since its creation, you probably came across
this question over and over again.
Why do you need React for front end development?
Well, you don't absolutely need it. But here I will talk about several things I like about React, and if you don't get convinced by the end of the article, I didn't complete my mission...
1. Fast
Just like with other single page applications,
React application will not reload every time when you
click on one of its components, and therefore is fast
and reliable. Also, it uses Virtual DOM that makes the
application fast. Virtual DOM allows ReactJS to
detect when exactly to re-render or when to ignore some pieces
of DOM, since it can detect when the data has changed.
In addition, as compared to Angular,
ReactJS yields better runtime performance. Just
wonderful!
wonderful!
2. Modular
A React app is made of parts called components.
Big or small, you can reuse them as many times
as you need, which is awesome. If you need
some code several times in different places, no need to
rewrite or look it up and copy - you just nest your
React component inside and you're all set!
This is one of the best things about React -
you can create bigger components out of smaller
components, use it as many time as you like, wherever
you like!
3. Simple
In React, we usually use JSX, instead of using regular JavaScript
for templating.
But if you don't like it, you can absolutely go for plain Javascript.
However if you do go for JSX, it's a lot of fun!
JSX is a syntax extension to JavaScript. Well, nicely put,
but what does it mean? JSX in a nutshell is HTML
intertwined with Javascript. You just need curly braces
if you want to write JavaScript expressions or
any dynamic content. Awesome, right?
4. It can be used to build mobile applications
React Native is used to build mobile applications, so
with a few adjustments, after getting the hang of React,
you will be able to create mobile applications as well. Isn't
that just perfect?
5. It can be tested easily
React applications are extremely easy to test.
I won't go into much detail here as my first post
on React basics is on its way. But let's just say that you will
be able to test React components like you test any other
JavaScript code.
Of course, this list is a non-exhaustive one.
No comments:
Post a Comment