Why ReactJs? – (┛◉Д◉)┛彡┻━┻ – Medium

Why ReactJs?  #react #reactjs

  • Instead of writing an html line for news, messenger and marketplace you can see that they are basically the same, the only thing that changes is the icon and the information so we can make a component called nav that receives information and an icon.
  • Let code this component:First, we are going to make its container, with an JSON object with the information we want to be see.Now we are going to do the component:Using this practice, we are able to create a web app by just iterating a JSON object, that will pass the information to the containers.Another cool thing of react is its community.
  • There is a lot of components already made so you can just add them to your project as easily as adding a library to your normal html code.
  • Some github repositories that have a lot of components are:· lot of people have a problem with HTML being mixed with JS because they feel like breaking separation of concerns but in reality, it is more of a separation of technologies rather than concerns.
  • It helps your application to be more efficient because you don’t need to repeat code, there is an amazing community behind it, it has some really awesome modules that helps you to manage the unidirectional data flow, as well as managing which component must be render and if it is a component that is visible in all of the pages such as a menu to just render it once instead of every time you change of page.Tldr: react is awesome.

React is a new JavaScript library developed by Facebook released in 2013, but it wasn’t until 2017 that react was stable. React is like the best of both worlds, it has the functionality of JavaScript…

@ReactDOM: Why ReactJs? #react #reactjs

React is a new JavaScript library developed by Facebook released in 2013, but it wasn’t until 2017 that react was stable. React is like the best of both worlds, it has the functionality of JavaScript and the basics of html.

React is based in components, but what is a component, you, my young Padawan may ask? A component is an isolated piece of the UI. Think about it this way, they are basically like JavaScript functions because they accept arbitrary inputs, called props, and it returns something, this something is an element that is visible in the screen. According to Google, Facebook, Instagram and many more, web components are the future of web development

The key for building correctly a react app is to think in DRY: Don’t Repeat Yourself. With React you are able to build composable and reusable components, what does this mean? This means that instead of spending a lot of time writing repeatable html code for just one page, you can easily just find the common components and build them. Let’s take this facebook as an example:

Instead of writing an html line for news, messenger and marketplace you can see that they are basically the same, the only thing that changes is the icon and the information so we can make a component called nav that receives information and an icon. Let code this component:

First, we are going to make its container, with an JSON object with the information we want to be see.

Now we are going to do the component:

Using this practice, we are able to create a web app by just iterating a JSON object, that will pass the information to the containers.

Another cool thing of react is its community. There is a lot of components already made so you can just add them to your project as easily as adding a library to your normal html code. So instead of spending an enormous amount of time building a masonry you can just add with yarn or npm the component called react-masonry-component to your project and in a matter of seconds you will have a functional masonry component in your project. Some github repositories that have a lot of components are:

A lot of people have a problem with HTML being mixed with JS because they feel like breaking separation of concerns but in reality, it is more of a separation of technologies rather than concerns. React is not a JavaScript MVC framework.

In my humble opinion, I think react is a great technology and here’s why. It helps your application to be more efficient because you don’t need to repeat code, there is an amazing community behind it, it has some really awesome modules that helps you to manage the unidirectional data flow, as well as managing which component must be render and if it is a component that is visible in all of the pages such as a menu to just render it once instead of every time you change of page.

Tldr: react is awesome.

Why ReactJs? – (┛◉Д◉)┛彡┻━┻ – Medium