Introduction to ReactJS

Why ReactJS with Asp.Net Core:

We can use React with Asp.Net Core by enabling JavaScript services. So that we can use Server Side Rendering. Using SSR page loads faster as a browser doesn’t need to download scripts, compile, etc.

Why do you need to upgrade?

Data Binding

  • React uses state, properties to bind values to HTML element. It’s unidirectional.

Advantages of ReactJS

Reusability

React uses a component-based approach, so for the large-scale application, we can use the same code at multiple places.
React uses JSX- combination of HTML and JavaScript as a component.

Performance

DOM rendering is faster.

Virtual DOM

  • React uses virtual DOM.
  • It creates a copy of original DOM into Memory.
  • Makes changes in this virtual DOM first.
  • Compare Virtual DOM and Actual DOM.
  • Apply new changes in actual DOM.

What we can do in ReactJS?

React native is based on ReactJS. You can develop cross-platform (iOS, Android) mobile application using it. It uses same fundamental UI building block as in Android and iOS. We can embed native Android, iOS code also. As we can develop both Android and iOS using the same codebase, it saves development time, cost and resources. A developer can directly push updates to the user’s phone.

We can build Single Page Applications. Applications developed using ReactJS performance is better as it uses virtual DOM. By default, React DOM escapes any values embedded in JSX before rendering them. Thus it ensures that you can never inject anything that’s not explicitly written in your application. Everything is converted to a string before being rendered. This helps prevent XSS (cross-site-scripting) attacks.

Add comment

Loading