Skip to content

Latest commit

 

History

History

lecture_2

Lecture 2

Lecture 2 gives an overview of React, a library for writing declarative UI components.

Study goals

React introduction

  • What dependencies does React have?
  • How does React integrate with other tools (babel/eslint)?
  • How do React component compose?

Introduction to React

State in React

  • What are props and state in React?
  • What is React component lifecycle (basic level), when is render called?

State in React

Path to Hooks

All components that can be, are implemented as pure function components.

React hooks

React hooks are functions that can be used in functional React components to use simple cases of local state in functional components.

Pure function components

  • What are class components and pure function components, when to use which?
  • How to type-check props?

Pure function components in React

User input

  • How to specify event handlers on native HTML elements?
  • What are callback functions, how to pass them from parent to children?
  • What is function context? How to bind a function to a context?

User input in React