The Devil Wears Prada

On the 16th of April, we watched the film. It was engaging because of Anne Hathaway, but in general, it was very similar to the previous film that we’d watched — The Princess Diaries. These films…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Why i choose React.

What is react?

React is a Library of Java Script. which is used for build Web UI designs.

react was initially released in 2013 by Facebook for using to create single page web applications.React is not a frame its a library of JavaScript.when any web page is renders on browser on any events page is reload and take much time to load web application but in react it only load those components which are required on current time and other data is store in its virtual DOM which run in one time after render data from Virtual DOM its remove its save much time to reload the web page. it secure then other libraries because with the help of react we can create a single web page application. what is single page application its describe below.

Single vs Multi page Applications

React is components based library and it have many benefits one of the most great is we create any design i.e i create a drop down Navigation bar and save it into a component and when we i required navigation i just export that component by its name and it renders on page as required.

Its also a Single page Mobile web application it means its just contain a one HTML file. there is no others pages like About, Support, Contact us etc.

Single page websites aim to provide just the right amount of information for a user to make a decision and act on it. we can adapt single page websites to smaller screens and devices easily and consistently. Plus, scrolling is an easy and natural movement for touch screen mobile devices.

Library vs Framework

What is the difference between a Java Script Library and a framework?

A big difference between Library and Framework is “Inversion of Control” a simple example is when we call a method from JavaScript Library it means we control the code with our requirements but when we use Framework it control is Inverted. In framework, all the control flow is already there, and there’s a bunch of predefined white spots that you should fill out with your code.

A library is just a collection of class definitions. The reason behind is simply code reuse, i.e. get the code that has already been written by other developers. The classes and methods normally define specific operations in a domain specific area.

React vs Angular

Angular has been around less then React, but it’s not a new kid on the block. It’s maintained by Google and, as mentioned by Igor Minar, used in more than 600 hundred applications in Google such as Firebase Console, Google Analytics, Google Express, Google Cloud Platform and more. Angular provides the following “out of the box”:

i) Templates, based on an extended version of HTML

ii) XSS protection

iii) Dependency injection

iv) Ajax requests by @angular/HTTP

v) Routing, provided by @angular/router

vi) Component CSS encapsulation

vii) Utilities for unit-testing components.

viii) @angular/forms for building forms.

React is developed and maintained by Facebook and used in their own products, including Instagram and WhatsApp. It has been around for around five years now, so it’s not exactly new. It’s also one of the most popular projects on GitHub. React provides the following “out of the box”:

i) Instead of classic templates, it has JSX, an XML-like language built on top of JavaScript

ii) XSS protection

iii) No dependency injection

iv) Fetch for Ajax requests

v) Utilities for unit-testing component.

DOM vs Virtual DOM

Virtual DOM

In React, for every DOM object, there is a corresponding “virtual DOM object.” A virtual DOM object is a representation of a DOM object, like a lightweight copy.

A virtual DOM object has the same properties as a real DOM object, but it lacks the real thing’s power to directly change what’s on the screen.

Manipulating the DOM is slow. Manipulating the virtual DOM is much faster, because nothing gets drawn onscreen. Think of manipulating the virtual DOM as editing a blueprint, as opposed to moving rooms in an actual house. In summary, here’s what happens when you try to update the DOM in React:

i) The entire virtual DOM gets updated.

ii) The virtual DOM gets compared to what it looked like before you updated it. React figures out which objects have changed.

iii) The changed objects, and the changed objects only, get updated on the real DOM.

iv) Changes on the real DOM cause the screen to change.

DOM

The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page.

Add a comment

Related posts:

Mindfulness

Watch the interview video that Lewis Howes does to Dean Graziosi about his book “Millionaire Success Habits”. Watch at 8 pm Dean Graziosi’s webinar “How To Confidently Profit From Today’s Real Estate…

KuCoin Welcomes CV Labs and Tokengate As Their Newest Ambassadors

CV Labs known as a unique place in Crypto Valley where great minds and new ideas come together and Tokengate as connecting people and tokens enabling token economies. For sure they would be a great…

How to Trust Your Own Ability

I remember saying to someone in the last month or so, “There’s very little I enjoy more in life than watching Stephen Curry highlights”. All makes, no misses. If you don’t know, look him up. Due to…