0% found this document useful (0 votes)
14 views18 pages

Fundamentals of React

React JS is a JavaScript library developed by Facebook for building user interfaces, allowing developers to create reusable UI components and optimize application performance through virtual DOM manipulation. It supports the development of single-page applications (SPAs), which enhance user experience by dynamically updating content without full page reloads. The current version of React is 18.0.0, and it is widely used in modern web and mobile applications, integrating easily with advanced technologies.

Uploaded by

akargutkar5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
14 views18 pages

Fundamentals of React

React JS is a JavaScript library developed by Facebook for building user interfaces, allowing developers to create reusable UI components and optimize application performance through virtual DOM manipulation. It supports the development of single-page applications (SPAs), which enhance user experience by dynamically updating content without full page reloads. The current version of React is 18.0.0, and it is widely used in modern web and mobile applications, integrating easily with advanced technologies.

Uploaded by

akargutkar5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 18
React JS Course Outcome: Make use of fundamentals of React JS to develop front end application Vijesh Nair ‘Assistant Professor ‘Computer Science & Engineering (Al & ML)‘React JS is.a:3S {javascript} library created by Facebook in: 2013 and maintained by Meta. eR O) Routt specializes in helping developers build User Interfaces (UI). ft abstracts DOM manipulation from developers and makes the user interface a function of application state. (O With React, developers can create reusable Ul components. These components can he used any number of times -anywhere in the application, This reduces the time for debugging and rewriting. 0} tnternally React performs smart and tlever: operations and: manipulates DOM: with o minimum: number: of ‘operations. Only the required components are re-rendered and the rest of the other components remain the same. & SF Honce using React can provide a faster interface and optimized application. thin Wik hc inom i Sod oat onl pein aanCurrent version of React.JS is V18.0.0 (April 2022). C Initial Release to the Public (V0.3.0) was in July 2013. React.JS was first used in 2011 for Facebook's Newsfeed feature. Facebook Software Engineer, Jordan Walke, created it. Current version of create-react-app is v5.0.1 (April 2022). create-react-app includes built tools such as webpack, Babel, and ESLint, iiecihanne absordboioousk Wow elev atid opkonon! e006 ied NoirGl The upgradation of the javascript performance of web browsers gaye birth to Single Page Applications (SPAs).. A single-page application is o web application that works in a browser and does not require @ page reload during use. © It londs all the files on the initial foad and then updates its DOM dynamically on user interaction, {Unlike the multi-page applications, in'single-page applications, only the needed assets are rendered, and the page gets updated. 1_As all the assets are not required to be.fetched.again, the bandwidth also. becomes low. ‘C1 An SPAs, the logic is executed in the browser rather than the server. This makes the app faster. thin Wik hc inom i Sod oat onl pein aan{In Single page applications, the server sends an HTML file oily on the firs} request. In alll the subsequent requests, only data:is:passed to.and from: the server. Initial Reqest + Initial Reqest + From Post ——> ©) a) Cs) ©) Client Server Server Client iipeenene bordisacoosk Wine i dove hose sioior yates ied NoirC2 React JS can be used for building both mobile and web applications. C1 Open up a lot of opportunities as most successful companies are using React. O) Reart is quite flexible and compatible and tan easily integrate advanced technologies like AR-VR and (OT. ‘2009 2010 2011 20"2 2019 2014 2015 2016 2017 2018 208 2020 2021 2022 jacthin Wak ic soa ni Siocon —Instead of manipulating the browser's DOM directly, React creates a virtual DOM In memory, where It does all the necessary manipulating, before making the changes in the browser DOM. Geico ak tc sol af ni 8 odd ou ponSSX stands for Javascript XML. 11's syntactic enhancement for: JavaScript that is based on ES6. eR It makes it ensier to write and add HTML in Read. It allows us to use JavaScript and HTML in the same file ‘an HTML-like syntax to describe Read's object tree. {The use of 15K is not’mundatory, but itis recommended as it makes HIM. GSS IK CSS0r185 coded end to BE B B 2 It enables developer to. create: virtual DOM using XML syntax. It ‘compiles down to pure JavaScript (React:createtlenent function calls). Traditional React approach approach iin abcd beoousk iow adv eid spc ied NoirU2. A DOM or Document Object Model is tho structured form of HTN elements present on a webpage. Javascript is used to. manipulate DOM to show modified or dynamic content on the web page. Q) Virtual DOM is a lightweight copy of the Real DOM stored in the memory, 2) React uses the virtual DOM represented as'a tree. Each element acts as a node of this tree, The manipulation of real DOM is slow. So. whenever changes are made to the webpage content, the changes are firs made in the virtual DOM. This also answers the question of why to use React js. After making all the changes in the virtual DOM, it is compared with the renl DOM. This gives the necessary changes ‘that are needed to be made. thin Wak oma i 9 eto ou peinO) React tries to. use the best way to manipulate the DOM so that minimum elements. are changed, and minimum. perations are needed: ‘Cl: Each component may contain a'state, and whenever the state changes, React updates the virtual DOM: 1 React maintains two virtual DOMs at-a time. One is updated, and one is the previous DOM. {Cl Dilfing is tho process in which Reuct compures the two versions and updates the necessary elements, Uy React updates the browser's real DOM efficiently. This is known as Reconciliation. thin Wak oma i 9 eto ou peinReconciliation Update Virtual DOM New Virtual DOM SnesFolder and file structure Se (Oy ctecite-react-app gives us everything we need to develop'a React application. Its I file: structure looks like this: C1 node modules This folder contains the files of packages that are required to tun the app (dependencies): This folder is managed by pri: OF public This is the entry folder of the project. All assets that can be directly accessed vie urls are placed in this folder.Folder and file structure favicon.ico This image is shown on the felt of the next fo the page’s title on the tab, when the website is louded. + index html This is the html wrapper for our components. > manifest This file deseribes your application when it is used as a web app in mobile phones. robots.txt This file is: used to manage the crawler behaviour,Folder and file structure The src directory is where welll spend most of our time, asit is where the source code for our ian aes Bt ar Siero This file contains the styles specific for the app component. rere ty eos ee ee c pore) a ee eee BS foents eee eee eo lcd ren pe De ee ee eee eee ts meresFolder and file structure ooo as oar This file contains the global styles. The styles written here will be applied to all the eee eee ela eee This file contains the global styles. The styles written here will be applied to all the See Fee oes Te eee eC ee besser Peco moe DS ee et ee eseFolder and file structure Paes De es ee eee ea ee Re tie Deere a a) Pees eee ge ese Co ee ere coe oT Se re ce eee oe oe ee eee ae ee a oe Coc Se ee EU CoRR: TES goR ere Re ee Coe See Eee ek eg ee ee ee ee ee ee Poeesey Pees soa SS ee eo eee eee eee) eats The public directory contains files that will be read by your browser while you are developing the app: the most important of these is index html. React injects your code into this file so that your browser CO ee tee ee te eee unless you know what you're doing. You very much should change the text inside the

You might also like