This document outlines a Reactjs workshop covering an introduction to Reactjs, its core concepts, and coding with Reactjs. The workshop introduces Reactjs as a library for building user interfaces, discusses its core concepts including components, virtual DOM, JSX, state and props, and demonstrates how to install and start coding with Reactjs. The document provides resources for further learning Reactjs.
21 ➢ SEO Friendly- Components are client side as well as server side render hence they are SEO friendly and no 3 rd party plugin required ➢ Coding is simpler because of JSX ➢ Big minds are backing Reactjs
22.
22 ➢ Virtual DOM- Reactjs use the concept of virtual DOM which helps in the performance ➢ Unidirectional Data Flow - Compare to the 2 way data binding. Reactjs use the concept of Unidirectional data flow which improve the over all performance.
44 React Virtual DOM? ➢ Keep track of state in DOM is hard ! ➢ It’ll be so easier to re-render the whole DOM on every change ➢ Unfortunately the DOM API is not so fast.
48 React Virtual DOM? ➢ Use different algorithm with the browser DOM tree to identify the changes ➢ Instead of creating new object, Reactjs just identify what change is took place and once identify update that state
49.
49 React Virtual DOM Re-renderingprocess ? ➢ Build new virtual DOM subtree ➢ Diff with the old one ➢ Compute the minimal set of DOM mutations ➢ Batch execute all update DÉMO
51 React JSX ? ➢React components are written in JSX, a JavaScript extension syntax allowing easy quoting of HTML and using HTML tag syntax to render components <div> <h1> Shopping list for {this.props.name} </h1> <ul> <li>Instagram </li> <li>Whatsap </li> <li>Oculus </li> </ul> </div>
52.
52 React JSX ? <div> <h1>Shopping list for {this.props.name} </h1> <ul> <li>Instagram </li> <li>Whatsap </li> <li>Oculus </li> </ul> </div>