Deferring loader data
Not all payloads are equally important to the user. Some data may only appear below the page’s fold and is not immediately visible to the user. Other information may not be of primary content of the page but slow down the initial page load. For example, we may want to prioritize displaying the product information for an e-commerce site as fast as possible. However, we might be okay deferring the loading of the comments section to speed up the initial page load time. For this, Remix provides the defer
and Await
primitives. In this section, we will utilize Remix’s primitives with React Suspense
in BeeRich to defer specific loader data.
Please review the README.md
file on GitHub for this chapter if you haven’t already: https://github.com/PacktPublishing/Full-Stack-Web-Development-with-Remix/tree/main/13-deferring-loader-data/bee-rich/README.md. This file will guide you through setting up the new expense and invoice changelog. Now, let’...