Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Fetching and Displaying Data | React Hooks and Context
React Mastery
course content

Conteúdo do Curso

React Mastery

React Mastery

1. Introduction to React Fundamentals
2. Styling in React Apps
3. React Hooks and Context
4. React in the Real World

bookChallenge: Fetching and Displaying Data

Task

Create a React component called DataFetcher that fetches and displays data from an API when the component mounts.

Instructions

  1. Import the appropriate hooks from the React library.
  2. Inside the component, use the useEffect hook to fetch data from the provided API endpoint when the component mounts.
  3. Display the fetched data in a user-friendly format within the component. You can choose how to format and present the data, such as a list, a table, or any other suitable format.
  1. Include an import statement to import the necessary hook from the React library.
  2. Utilize the useEffect and useState hooks for this task.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 7
some-alt