React
React is a
famous java script library which is used in many web developing applications.
This is not a framework but it is a java script library. Even though it is not
a framework it is still using in many applications in many companies. This is
so popular among the users as it has many latest features which is unavailable
in other applications. So many people move to this library to make their
application more success.
Notable Features in react
One way Data Flow
- One way data flow means it stores the data in one place and data flows from parent component to child component.
- Data is immutable in this flow.
- Flux is the architecture used by face book to maintain one way data flow in millions of applications.
Virtual DOM
- It is the virtual environment which creates with the real DOM. This virtual DOM helps for the better performance of the web application.
- When a user need to do a change the virtual DOM get updated first. Then The real DOM and the virtual DOM be compared with each other and change only the exact part which needed to be changed. So the time consumed for the whole page loading reduces with Virtual DOM.
JSX
- JSX is not a string or html. This can be called as syntax extension for java script. It has the feature of template language.
- JSX provides react elements which empowers with java script. After the compilation of JSX it behaves like normal java script. Therefore, these can be written in a normal java script function too.
- Not like in html JSX should have proper closing tags. If there are no specific closing tags an error can be occurring.
- JSX is closer for java script than html. So it uses camel cases in naming conventions.
- React DOM does not give opportunity to enter values until React DOM. Because of that in can never inject scripts which are not explicitly written in application. So cross site scripting cannot be occurred.
Comments
Post a Comment