[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-489296-105":3,"detail-sidebar-cat-0-en-105":73,"doc-detail-489296-en":123,"doc-similar-489296":155},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":66,"head_meta":68,"extra_data":70,"updated_unix":72},105,"en","ssui-11-12-react-react-for-javascript","SSUI-11-12-React - React for JavaScript","","Lecture materials for SSUI (Software Structures for User Interfaces) covering Lectures 11 and 12 in Fall 2022, introducing React for JavaScript. The slides document logistics for midterm scheduling and homework updates, then explain what React is and why it is more declarative than imperative JavaScript. Core concepts include JSX, props-driven rendering, state and dynamic DOM updates, component reuse, and starting setup with Node.js/npm and Create React App, followed by learning and resource guidance.",{"@graph":14,"@context":65},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/ssui-11-12-react-react-for-javascript/489296/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/ssui-11-12-react-react-for-javascript/489296.png","ImageObject",300,407,{"name":42,"@type":43},"noah","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-30","2026-10-01",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",11,{"@type":57,"mainEntity":58},"FAQPage",[59],{"name":60,"@type":61,"acceptedAnswer":62},"How do students get started running a React app?","Question",{"text":63,"@type":64},"The slides instruct installing Node.js and npm, using a console to run npm/npx, and following Create React App quick-start steps to create a project and start it with npm start.","Answer","https://schema.org",{"og:url":32,"og:type":67,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":69,"canonical":32},"index,follow",{"doc_id":71,"site_id":7},489296,1791090182,{"code":4,"msg":74,"data":75},"success",[76,80,84,88,93,97,102,107,112,115,119],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":77,"show_sort_weight":78,"slug":79},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":81,"show_sort_weight":82,"slug":83},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Exam",70,"exam",{"id":89,"doc_module":4,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},5,"Comic",60,"comic",{"id":94,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":95,"slug":96},6,50,"technology",{"id":98,"doc_module":4,"doc_module_name":25,"category_name":99,"show_sort_weight":100,"slug":101},7,"Healthcare",40,"healthcare",{"id":103,"doc_module":4,"doc_module_name":25,"category_name":104,"show_sort_weight":105,"slug":106},8,"Research & Report",30,"research-report",{"id":108,"doc_module":4,"doc_module_name":25,"category_name":109,"show_sort_weight":110,"slug":111},9,"Religion & Spirituality",20,"religion-spirituality",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":113,"show_sort_weight":110,"slug":114},"World Cup","world-cup",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":116,"slug":118},10,"Lifestyle","lifestyle",{"id":120,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":89,"slug":122},19,"General","general",{"code":4,"msg":74,"data":124},{"doc_id":71,"user_id":125,"nickname":42,"user_avatar":126,"doc_module":4,"category_id":94,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":127,"file_id":128,"file_url":129,"file_type":130,"file_size":131,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":132,"language":133,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":134,"faqs":135,"seo_title":136,"seo_description":12,"update_tm":137,"read_time":138,"preview_page_count":33,"preview_urls":139},1099529839121,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Lectures 11 and 12:  \nReact for JavaScript  \n05-431/631 Software Structures for User Interfaces (SSUI) Fall, 2022  \n© 2022-Brad Myers 1  \nLogistics (lecture 11)  \n􀁺 No longer need to create GitHub Pages version for homeworks.  \n􀁺 No office hours tomorrow (Wednesday, Oct. 5 )  \n􀁺 Starting to cover React today, since HW4 spans mid-fall break , when there are no lectures or labs  \n􀁺  Midterm quiz  \n􀁺 Take home, open book, open internet  \n~~􀁺  Will start at 3:05 on Wednesday 10/12/2022 ~~,~~ due 24 hours later on Thursday~~,~~ 10/13/2022 at 3:05 (before class )~~  \n􀁺 Updated: Wednesday 10/12/2022, due 48 hours later on Friday, 10/14/2022 at 3:05 but still come to class on Thursday  \n􀁺 Will include topics through lecture 12 (formerly 13), and homeworks 1 to 3  \nLogistics (lecture 12)  \n􀁺 These slides were updated  \n􀁺 Reload slides from schedule, lecture 11  \n􀁺 HW3 due Tuesday  \n􀁺 Bug in supplied floodfill js file  \n􀁺 See Piazza  \n􀁺 Or download new version:  \n[https://github.com/CMU-SSUI-Fall2022/HW3/blob/main/floodfi](https://github.com/CMU-SSUI-Fall2022/HW3/blob/main/floodfi)ll.js 􀁺 Request for midterm to be Thursday after class until Friday:  \n􀁺 4:25 (after class) on Thursday, 10/13/2022, due 24 hours later, on Friday, 10/14/2022 at 4:25  \n􀁺 Any objections?  \nWhat is React  \n􀁺  [https://reactjs.org/](https://reactjs.org/)  \n􀁺 “A JavaScript library for building user interfaces”  \n􀁺 Created by Facebook and actively used and supported by them  \n􀁺 Goal: be more declarative, like original html and CSS  \n􀁺 As opposed to imperative like JavaScript  \n􀁺 React handles updating and redrawing as data changes  \n􀁺 Still need input handlers  \n􀁺 New way to write html with computed parameters = JSX  \n􀁺 Build reusable, encapsulated components  \n􀁺 E.g. , header and footer  \n􀁺 React can also be used “native” to make Android andiOS apps  \nKey Concepts  \n􀁺 JSX – yet another syntax for html  \n􀁺 Almost like regular html, but some differences  \n􀁺 Yet another syntax for comments: { \\ * comment *\\}  \n􀁺 Compute elements based on props  \n􀁺 Computed and returned by render()  \nmethods  \n􀁺 CSS classes called className  \n􀁺 States – dynamic data  \n􀁺 Note: totally different from state-transition-diagrams  \n􀁺 Store values as JS objects  \n􀁺 DOM updated when state’s values change  \nGetting Started  \n􀁺 Download node.js and npm: [https://nodejs.org/en/](https://nodejs.org/en/)  \n􀁺 Now can bring up a console and type npm or npx  \n􀁺 Follow these instructions for getting started with React  \n􀁺  [https://create-react-app.dev/docs/getting-started\\#quick-start](https://create-react-app.dev/docs/getting-started#quick-start)  \n􀁺 cd into the code folder (expert hint: use drag-and-drop – see below) C: \\Users\\bm1x\\Documents> cd C: \\Users\\bm1x\\Documents\\UICOURSE\\05- 631fall22\\HW 4-solution  \nC: \\Users\\bm1x\\Documents\\UICOURSE\\05-631fall22\\HW 4-solution> npx createreact-app my-app  \nC: \\Users\\bm1x\\Documents\\UICOURSE\\05-631fall22\\HW 4-solution> cd my-app C: \\Users\\bm1x\\Documents\\UICOURSE\\05-631fall22\\HW 4-solution> npm start  \n􀁺 Will open new tab in browser running the app.  \n􀁺 Can edit App.js and changes will be shown immediately on save  \n􀁺 Stop with ^C in cmd window, or close tab, or close cmd window  \nExtra resources for getting started  \n􀁺  [https://reactjs.org/docs/create-a-new-react-app.html](https://reactjs.org/docs/create-a-new-react-app.html)  \n􀁺  [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)  \n􀁺 W3Schools intro on how to get started with React dev:  \n[https://www.w3schools.com/react/react_getstarted.asp](https://www.w3schools.com/react/react_getstarted.asp)  \n􀁺 Thanks to Michael Liu and Clara Cook and Alex Cabrera also for help with these slides!  \nLearning React  \n􀁺 Can’t cover it all in two lectures & two labs  \n􀁺 Lots of great material out there to learn from  \n􀁺 Lots of Stack Overflow answers that cover most problems  \n􀁺 eCommerce websites are exactly its target application  \n􀁺  HW","cbCaioWqsIqtk6le","https://ap.wps.com/l/cbCaioWqsIqtk6le","pdf",1326512,35,"English","# Logistics (lecture 11)\n## What is React\n# Key Concepts\n# Getting Started\n## Extra resources for getting started\n# Learning React","[{\"question\":\"How do students get started running a React app?\",\"answer\":\"The slides instruct installing Node.js and npm, using a console to run npm/npx, and following Create React App quick-start steps to create a project and start it with npm start.\"}]","SSUI-11-12-React - React for JavaScript | PDF",1790822029,88,[140,144,147,151],{"page_no":22,"url":141,"width":142,"height":143},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/28d40aa45f12d765d5f7fe3304099cd0.webp",983,736,{"page_no":26,"url":145,"width":146,"height":143},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d42a440a9b1e8e595f6a857853f14210.webp",982,{"page_no":30,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/03fd8808a5853f977ff049671d82c5d2.webp",981,735,{"page_no":33,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/159182e5801bde1b3d35ec6864cfc872.webp",980,734,{"list":156,"token":11},[157,164,171,178,184,190,196,202,208,214],{"doc_id":158,"doc_title":159,"file_type":130,"home_preview_img_url":160,"slug":161,"view_count":162,"category_name":29,"create_tm":163},489294,"Getting Started with React - React Fundamentals and Setup Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926988797/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=dWntPMh%2B1yIrXwu65MbcfZl0R5k%3D","getting-started-with-react-react-fundamentals-and-setup-guide",13,1790822021,{"doc_id":165,"doc_title":166,"file_type":130,"home_preview_img_url":167,"slug":168,"view_count":169,"category_name":29,"create_tm":170},391757,"108 React Interview Questions to Hire Top Developers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917705460/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=wx%2FgXiD7Q1qWhHfv9Lx4683qwWw%3D","108-react-interview-questions-to-hire-top-developers",12,1790358526,{"doc_id":172,"doc_title":173,"file_type":130,"home_preview_img_url":174,"slug":175,"view_count":176,"category_name":29,"create_tm":177},489293,"The Ultimate React Handbook - Introduction - Starter Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926988787/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=QIIx2w%2BjlGF2SLG7V9IkDlexzdU%3D","the-ultimate-react-handbook-introduction-starter-guide",14,1790822020,{"doc_id":179,"doc_title":180,"file_type":130,"home_preview_img_url":181,"slug":182,"view_count":30,"category_name":29,"create_tm":183},692285,"React Fundamentals - A Beginner’s Guide to JavaScript, TypeScript, HTML, and CSS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003187007/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=qWZITMfbTHdULHJduCZtx34tMi0%3D","react-fundamentals-a-beginners-guide-to-javascript-typescript-html-and-css",1794192415,{"doc_id":185,"doc_title":186,"file_type":130,"home_preview_img_url":187,"slug":188,"view_count":22,"category_name":29,"create_tm":189},759801,"The Node.js Handbook - Introduction to Node.js","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044485168/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=jXaTXmUnO7FvRsBtaci5h5ld2RM%3D","the-nodejs-handbook-introduction-to-nodejs",1795895118,{"doc_id":191,"doc_title":192,"file_type":130,"home_preview_img_url":193,"slug":194,"view_count":22,"category_name":29,"create_tm":195},759796,"Microservices with Node.js","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044484999/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=vkeX8Z1ZRdhQKnq1diBhE0ZlpFQ%3D","microservices-with-nodejs",1795895075,{"doc_id":197,"doc_title":198,"file_type":130,"home_preview_img_url":199,"slug":200,"view_count":30,"category_name":29,"create_tm":201},697391,"Learning JavaScript - A Hands-On Guide to the Fundamentals of Modern JavaScript","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009804094/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=U%2Fldw4v7RizfpeHBGAFv%2FK0j4gc%3D","learning-javascript-a-hands-on-guide-to-the-fundamentals-of-modern-javascript",1794438282,{"doc_id":203,"doc_title":204,"file_type":130,"home_preview_img_url":205,"slug":206,"view_count":30,"category_name":29,"create_tm":207},692283,"Learning React - Second Edition - A Hands-On Guide to Building Web Applications Using React and Redux","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003186963/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=W0nsPbF9ZJwb451VGHGDl4OPRbc%3D","learning-react-second-edition-a-hands-on-guide-to-building-web-applications-using-react-and-redux",1794192412,{"doc_id":209,"doc_title":210,"file_type":130,"home_preview_img_url":211,"slug":212,"view_count":98,"category_name":29,"create_tm":213},692311,"Node.js Course","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003200153/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=7RSISICB%2FtAcjKGDgz4%2FHZbSt%2B4%3D","nodejs-course",1794192942,{"doc_id":215,"doc_title":216,"file_type":130,"home_preview_img_url":217,"slug":218,"view_count":33,"category_name":29,"create_tm":219},692292,"Full-Stack React, TypeScript, and Node - Build cloud-ready web applications using React 17 with Hooks and GraphQL","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002730793/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=4KzO%2F3VGie4RRTHGHoGNAipuoMc%3D","full-stack-react-typescript-and-node-build-cloud-ready-web-applications-using-react-17-with-hooks-and-graphql",1794192431]