ECE366 - Lesson 6

Intro to Javascript and React

Instructor: Professor Hong

Review & Questions

## Basic HTML
## What is HTML? - HyperText Markup Language (not a programming language) - Standard markup language for website creation - Maintained World Wide Web Consortium (W3C) - Parts - opening tag, content, closing tag
## Intro to React
## What is React? - Javascript library - Created at Facebook - Open-sourced in 2013 - Docs: [https://react.dev/reference/react](https://react.dev/reference/react)
## What is Javascript? - High level, interpreted language - Allows you to implement complex features on web pages - Used with HTML and CSS (for styling) - Logging: ```console.log();```
## Setup/Installation - Add React Developer Tools from Chrome Extensions and add to chrome - Inspect Element -> Components - Can also install on Firefox
## ReactDOM.createRoot ReactDOM.createRoot() - 1 argument - a DOM element that will serve as the root container for the React application
## React Components - A function that returns JSX and can be rendered in DOM - Should use capital letter for component/function name - Multiple React components should be wrapped into 1 component - Can be used to display dynamic data
## Component Properties - Add props argument to component functions - A container where you can put any properties in the component
## React