What and Why React js
What is React js…?
React js is a JavaScript library that is
open source for building user interfaces.
The two key points above definition are React
js is a JavaScript library. It is not a framework.
The second key point is the building of
user interfaces.
So, React js does not give importance to
other factors such as routing or HTTP requests. Its sole purpose is to create
rich user interfaces.
Now, You don't have to be concerned about
how you'll manage routing, HTTP, and other features now.
React js has a large ecosystem, works well
with other libraries, and can be used to create full-fledged web apps.
Reasons you might want to learn React js…
We now understood what React
js is and how it is used. Let's look at some of the reasons you might want
to learn React js.
Let's start with the fact that React
js is a Facebook project that is developed and maintained.
You can be sure that when a company like
Facebook uses React js in its own products and invests money and resources
to keep the project alive, it isn't going away anytime soon.
By learning React js, You have a great
chance of landing a front-end developer job you've always wanted.
Technical aspects of React js and why it is a good choice…
Now let me touch slightly on the technical
aspects of React js and why it is a good choice.
React js has a component-based architecture
and this let you break down your application into small encapsulated parts
which can then be composed to make a more complex UI.
For example, a traditional website can be
broken down into header, sidebar, nav, main content, and footer.
Each section represents a component that,
when composed in the right way, make up the entire website.
Components also make it possible to write
reusable code. For example, you could have a component for an article on React
js.
The same component can be reused for
articles on Angular or Vue by simply passing the right data into the article
component.
For enterprise applications, the ability to
reuse code is a huge plus point.
Another key point is that React js is
declarative. Now, what does that mean?
Basically, we just have to tell React js
what we want. DOM Library will build the actual UI. This is the declarative
paradigm and this is in contrast with the imperative paradigm we are usually
used to which implements algorithms in explicit steps.
Let me give you a relatable example.
Let's say you go to an artist. You ask them
to draw a landscape. You don't tell them how to draw it, it's up to them.
This is declarative. You tell what has to
be done and the artist will get it done for you.
And the same task you ask of a 5-year-old
child. But, this time you tell them to first draw the mountains, then the
river, then the trees, and so on.
You explicitly specify each step and you
control the flow of the landscape which is an imperative paradigm.
Why this is important to understand is
because React js is declarative. You have to tell react what the UI should look
like and react will create the actual UI. React js will make it painless for
you to create complex UI's by abstracting away the difficult parts.
React js will handle efficiently updating
and rendering just the right components in your application when your data
changes, DOM updates, which is one of the more expensive operations, are
handled gracefully in React js.
Now React js also makes no assumptions
about the rest of the technology stack you're using for your project. You can
seamlessly integrate react into any of your applications.
Be it just a part of the page or a complete
page, or even an entire application itself, React js will fit right in.
And once you have a good knowledge of React
js, you can also enter the world of mobile applications with React native. The
bottom line is that React js will be a great addition to your skillset.
What are the prerequisites to get started with React…?
Let’s see what are the prerequisites to get
started with React?
HTML, CSS, and JavaScript fundamentals are
absolutely necessary for this course. I will also be making use of ES6. So, a knowledge
of modern JavaScript is also essential.
You don't have to be an expert by any
means, but there are a few features that make it so much easier to write react
code and that is why I recommend learning to React js with ES6.
With JavaScript, make sure you are aware of
this keyword, map, and reduce methods. Mainly the map method.
With ES6, please go through ‘let’ and ‘const’
declarations, arrow functions, template literals, default parameters, object
literals, and rest and spread operators.
No prior knowledge of
any other JavaScript libraries or frameworks is necessary.


Comments
Post a Comment