I am pretty new to JavaScript and am having trouble figuring out how to display a "loading" gif onscreen while map items are loading. I have been able to figure out how to do it using the 3.x api but am stumped when trying to accomplish the same thing using the new arcgis-javavascript-4.2 version. Any help is greatly appreciated.