1. Home
  2. Training Library
  3. Programming
  4. Courses
  5. React - Working with External Data

React - Working with External Data

Developed with
Introduction to External Data in React


Learning Objectives 


  • The component lifecycle  
  • Hooks in React  
  • How to create restful services  
  • How to use an Effect Dependency Array  
  • How to hand errors in data requests 
  • How to send data   

Intended Audience







- [Instructor] We've already stressed on several occasions that React is for taking data and displaying it. So it's clear that data plays a massive part in any application that we build using it. As with any web application that uses JavaScript, refreshing the browser is catastrophic for any data stored in the page. Obviously we want to be able to persist data and we have several options. Many outside the remit of React for doing this. One option would be to leverage local storage in the browser. While this provides persistent storage across browser sessions, it can be removed by the user and it will not persist data that needs to be held at the server level. Modern web applications can have many tiers. And it's usual to request and send data from some form of data service. For a web application to get this data, it needs to be able to make HTTP requests and then handle the data when it's received. This asynchronous nature causes a 'chicken and egg' situation for React. As we want to render a UI quickly but need the data to populate it. To help us solve this conundrum we need to understand how components are created, updated, and destroyed. And what goes on behind the scenes while those things are happening. React components have a defined life cycle. And we need to know when various things happen during it so that we can work with the data at the right point.

About the Author
Ed Wright
Senior Learning Consultant
Learning Paths





Covered Topics