Performance

Guidelines for creating a fast-loading app.

The source code for an app is loaded as a single JavaScript bundle. As a result, any increase in the bundle size affects the initial load time. To reduce the bundle size, we recommend:

  • Being mindful of dependencies, which can add up quickly
  • Using a tool, such as Webpack Bundle Analyzer, to monitor the bundle size
  • Loading assets via URLs instead of importing them as data URLs

These days, you can run fairly intensive processes in the browser. Generally though, we recommend offloading these processes to a server. This ensures that performance is consistent across devices and isn't affected by the amount of memory available to the app's frontend at that particular moment.

To learn how to interact with a server, see Sending HTTP requests.

Visual affordances, such as loading spinners, can improve the perception of performance. This may not be as satisfying as actually improving performance, but it's an important step.

To learn more about loading states, see Loading.