Fetching and Mutating Data
Handling dynamic data is crucial in today's web development landscape. Most modern apps interact with data from various sources. The way an app manages loading states, errors, and data updates plays a big role in user experience. Fortunately, Remix offers a comprehensive solution for both retrieving and updating data.
This chapter covers the following topics:
- Fetching data
- Mutating data
In this chapter, we will implement data reads and writes in BeeRich. First, we will practice data loading. Then, we will learn about data mutations in Remix and implement an expense creation form.
By the end of this chapter, you will know how to fetch and mutate data in Remix. You will also understand how Remix executes loader
and action
functions and how Remix revalidates loader data after mutations. Finally, you will have practiced building applications with progressive enhancement in mind, which we will build upon in Chapter 6, Progressively...