Skip to Content
Full Stack Development with Spring Boot and React - Third Edition
book

Full Stack Development with Spring Boot and React - Third Edition

by Juha Hinkula
April 2022
Intermediate to advanced
378 pages
6h 21m
English
Packt Publishing
Content preview from Full Stack Development with Spring Boot and React - Third Edition

Chapter 8: Consuming the REST API with React

This chapter explains networking with React. That is really important skill which we need in most of the React apps. We will learn about promises, which make asynchronous code cleaner and more readable. For networking, we will use the fetch and axios libraries. As an example, we will use the GitHub REST API to demonstrate how to consume RESTful web services with React.

In this chapter, we will cover the following topics:

  • Using promises
  • Using the fetch API
  • Using the axios library
  • Practical examples
  • Handling responses from the REST API

Technical requirements

In this book, we are using the Windows operating system, but all the tools are available for Linux and macOS via Node.js.

The following GitHub ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Full Stack Development with Spring Boot 3 and React - Fourth Edition

Full Stack Development with Spring Boot 3 and React - Fourth Edition

Juha Hinkula

Publisher Resources

ISBN: 9781801816786Supplemental Content