CMS data (like any Obj, Widget or Binary) needs to be loaded from the cloud service before it can be used. When rendering content inside a React component, all CMS data is loaded automatically if your component is wrapped with Scrivito.provideComponent or Scrivito.connect.
Sometimes, however, you may want to access CMS data outside of rendering, for example inside an event handler like onClick, or in a server-side script. This is where Scrivito.load comes in: It loads CMS data and allows you to work asynchronously with the loaded data.
If you wrap a function with Scrivito.load, it executes the passed-in function and loads all the required data. Once all data has been loaded, Scrivito.load resolves with the value returned by your function.
Here is a simple example: