Home Reactjs Why is ReactJS Reusable?

Why is ReactJS Reusable?

0
182
reactjs

React is a library for building user interfaces that could include user interfaces for web, a typical HTML page or it could also include a mobile experience on iOS or Android devices. React framework has been written in JavaScript language and was developed by a developer named Jordan at Facebook in 2011. Later facebook open-sourced it in 2013 at a react.js conference in the US.

The language is declarative. You can describe the elements using a tremor like a syntax react some people also view react as V in MVC. MVC stands for Model View Controller and V represents View inside MVC.

If you do not know MVC pattern don’t worry there is not a prerequisite to know about MVC. It’s exclusively used to describe a visual appearance of user interface elements and dynamic interaction with the user and reactjs development companies doing it really really well.

Why react js is reusable?

React is modular in nature you can create components in react and you can nest components within each other. You can nest one component with another component. You could also reuse the same component in several views.

That’s why react is very reusable and you can reuse the component that you have created again and again. So just to give you an example, what you see on the screen is basically a friend list. This friend list consists of many different components.

So these are different components: it consists of a friend list and the friend list item. Basically, the friend list is a collection of Friend list items. Each friend list item consists of a picture of a friend then the name of the friend, the number of friends he has, and also a verification button whether they are still friends with this person or not.

Inside the friend list item, there is another element called friend list info which consists of just friend name and the number of elements and the number of friends. Friend list item again consists of another react element which is called friend info.

Friend info consists of the name of the friend and the number of friends it has. In addition to the friend info, the friend list item also consists of the picture of a friend and also a boolean flag which indicates whether he is friends with me or not. 

 

A very complex view can be easily refactored into the individual react components.

So this is a visual appearance of a react view.  And the way you describe that in a web page is a similar XML like syntax you basically describe a Friend list item and inside when this you basically have a friend list at the top inside Send as you have a collection of this friend list item and you have their attributes like picture URL.

So as you can see a very complex view can be easily refactored into the individual react components and you can describe that is using a declarative language as you can see on the screen now these again react each of these elements is a custom react component which we can create using a JavaScript and this core each of this component like friendly system. 

Our friend info could be reused on several other screens in case you are wondering why to use react at all you have come to the right place. You might be wondering, I am already using HTML to create the web pages, I have been using frameworks like angular or ember or knockout in addition to my HTML to create the dynamic HTML elements. 

 

Using Javascript, you can write web clients as well as the webserver application.

Also, these days as you might be knowing we can also use JavaScript on the server-side a lot of frameworks like no just a lot of frameworks like node.js that are available, where you can write server-side applications in pure JavaScript so you have the JavaScript is becoming very popular and it’s very useful.

A full-stack application developer skill using javascript these days you can write web client as well as the webserver application also if you know react you can also. There’s also a special version of react called react native using which you can also build the mobile application in ios and android.

 

Who is a full stack developer?​

So as you can see you can use react to build camp web applications on the client-side web application on the server-side and also mobile applications. So this will really give you an edge over other developers because knowing to react and JavaScript you become a full stack developer.

Full-stack developer basically is the developer who’s capable of developing client-side applications as well as the service and application and also mobile application.

The primary responsibility of a Node js developer is to write, develop, and implement web-based server-side programming to support business requirements. Having a strong base and knowledge in various forms of JavaScript server-side programming such as ExpressJS, StrongLoop, etc is expected from a Nodejs developer. Node js developer is a part of backend development which includes integration of third-party web services and assists the frontend developers to complete the entire application development process.

These skills are very rare these days so if you have JavaScript skills along with react you have definitely a very bright future in react also has much better performance as compared to other JavaScript frameworks like angular and amber.

So I have a slide for you to showcase how the performance of a react is better as compared to the other JavaScript frameworks so who’s using network react these days ever since Facebook open-sources react to 2013.

Netflix, Yahoo, Instagram & New York Times, Khan Academy using React

Facebook internally is using it for this chat application in addition to Facebook a lot of other big companies like Netflix, Yahoo, Instagram & New York Times, Khan Academy, and also Airbnb uses react in all of their applications.

That is the testimonial to the popularity of the react app reacts framework and that’s why it’s becoming more and more popular.

GraphQL and GraphQL in Relay – Facebook’s other libraries

In addition to react there are two other libraries available from Facebook, GraphQL and “GraphQL in Relay” is very useful for writing queries that you can use to fetch the data from the server in a declarative way. The relay is basically a glue that blurs between the query and the server so using the react graph QL and relays you can really build very powerful web applications that are highly performant at highly scalable.

Having said that to use react you don’t need to know graph QL and you can use react without graph QL and others will be publishing new courses on graph QL and relay in your future and then it will send an announcement and then you can take those courses as well.

React Native is an open-source mobile application platform created by Facebook. It is used to build Android, iOS, Web, and UWP applications by allowing developers to use React along with native platform capabilities. React components wrap existing native code and communicate with new APIs through the Composable UI model of React and JavaScript. This facilitates native app development for a whole new team of developers and helps current native teams to work even faster. 

 

Embarq Ryan Florence from Facebook as demonstrated in react.js conference, in 2015

The react performance is very very better than other commonly used JavaScript frameworks like angular and Embarq Ryan Florence from Facebook as demonstrated in react.js conference, in 2015 basically he has demoed an application that monitors TB the same application has been developed in angular and react.

There are three different key screens one on the left is a demo built using ember, the one in the middle with the demo built using angular, and the one on the right is the demo built using react. So as you can see the performance and the memory footprint of amber on the left keep on climbing, so there is a memory leakage in the member and also the memory of angular is comparable to the memory footprint of react.

Now, as you can see the performance wise the react application is responding a lot faster as compared to angular and imbel.  Also, the responsiveness of the app that is when a mouse hovers over a particular link the react responds to a very better way instantaneously as compared to ember and angular so this demonstrates basically the performance of the react app is great way better as compared to ember and angular.

No Comments

Leave A Reply

Please enter your comment!
Please enter your name here