Thinking in React

Welcome to Week 5: Thinking in React

Welcome to Week 5, where we will continue to build on our React knowledge and learn how to think in React. Thinking in React is an essential skill to master as it sets the foundation for how we structure our applications and how we manage data flow.

This week, we will compare class components with functional components and understand the pros and cons of each. We'll dive into the concepts of props and state, two fundamental aspects of React that handle data and determine how our components render and behave.

Next, we'll introduce the useState and useEffect hooks. These hooks allow us to manage the state and side effects of our functional components. We'll also discuss how to render lists in React, an essential tool for displaying arrays of data on the front end.

By the end of the week, we will introduce the concept of React Hooks. Hooks are a powerful feature of React that allows us to use state and other React features without having to write a class. Finally, you will get a chance to apply all your knowledge to a project.

Learning Objectives

By the end of this week, you will be able to:

  • Understand the 'thinking in React' philosophy and apply it to problem-solving in building React applications
  • Distinguish between class components and functional components, and know when to use each
  • Understand the concept of 'props' in React and use it to pass data between components
  • Understand the concept of 'state' in React and manage local state using the useState hook
  • Describe the component lifecycle in both class and functional components
  • Use the useEffect hook to handle side effects in your functional components
  • Render lists of data in React
  • Understand some new features provided React Hooks and how to use them in your project