Search⌘ K

Add a Loading View

Explore how to implement a loading view using spin.js in Marionette.js applications to provide user feedback during data latency. Learn to create a template and view for the spinner animation, integrate it in the main application region, and manage view transitions effectively.

We currently have a two-second delay when displaying a contact in our Show sub-module. Although our app behaves properly and waits for the data to be returned before displaying the view, it’s not very communicative. The user has absolutely no feedback as to whether the app is actually doing anything useful while they’re waiting.

Create a loading view

To address this issue, let’s create a loading view to display while data is being fetched.

We’ll use the spin.js library, which will enable us to ...