



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to the react javascript framework, which is used for front-end web development. It covers the fundamentals of react, including the use of jsx (javascript and html in the same file), functional programming concepts, and the component-based architecture. The document also discusses the timeline of front-end javascript frameworks, common tasks in front-end development, and the creation of a new react app. Additionally, it introduces the concept of hooks, which are special functions that allow developers to interact with the state and lifecycle of react components. The usestate and useeffect hooks in detail and provides an overview of other built-in hooks. Finally, it discusses the process of building and deploying a react project, as well as some popular third-party components and libraries used in react development.
Typology: Summaries
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















A workshop for COMP 523 Aaron Smith Monday, Feb. 10, 2020
App state^ Data definition, organization, and storage User actions^ Event handlers respond to user actions Templates^ Design and render HTML templates Routing^ Resolve URLs Data fetching^ Interact with server(s) through APIs and AJAX
const first = "Aaron"; const last = "Smith"; const name = {first} {last}; const listWithTitle = ( <> COMP 523
Dr. David Stotts {name}
</> ); const list = (
Dr. David Stotts {name}
);
Functions are “first class citizens” let add = function() { console.log('Now adding numbers'); const five = 3 + 2; }; function performTask(task) { task(); console.log('Task performed!'); } performTask(add); function foo() { return function() { console.log('What gets printed?'); }; } foo foo(); foo()();
Variables are immutable let a = 4; a = 2; // Mutates a let b = [1, 2, 3]; b.push(4); // Mutates b let c = [...b, 4]; // Does not mutate b
Components are functions for user interfaces let y = f(x); Input x Output^ number let y = ; Input x Output^ HTML Math function: Component function:
export default function MyComponent(props) { return Hello, world! My name is {props.name}; } const html = ; Inputs are passed through a single argument called “props” The function is executed as if it was an HTML tag The function outputs HTML The component is just a function Parameters are passed in as HTML attributes
Title TodoForm TodoList Todo Big idea: A digital to-do list First step: mockup / wireframe
App is a boilerplate starter component public holds the initial html document and other static assets package.json configures npm dependencies index.js binds React to the DOM
Title TodoForm TodoList Todo Title TodoList TodoForm Todo Todo^ Todo App