Chapter 3: Using Models, Services, and Mocking Data
One of the main features of a frontend web application is communication with the backend. Our application needs to collect user input and send it for processing.
In this chapter, you will learn how to define data by creating typescript interfaces and column definitions for the ProTable
component. You will learn how to simulate the backend logic and data using Umi mock files. You will know how to send HTTP requests using the umi-request library. You will also learn to share states and logic between components using models.
We'll cover the following main topics:
- Defining response types and column types
- Creating the opportunity details page
- Simulating data and API responses
- Sending HTTP requests with Umi request
- Using models for sharing states and logic
By the end of this chapter, you'll have learned how the data flow works in Umi and how to organize your projects using the services
and...