Loader

Last updated Tuesday 17 February 2026

The Loader handles the downloading and display of fonts, images, videos, and audio files, while managing the preloader during the entire loading process.

Register your media to download here.

Location

  • Located inĀ src/themes/reactwp/js/inc/Loader.js

perPage Parameter

Choose whether you want to download only the media for the current page or preload all media in advance.

Preloader Panel

Use the #loader div from src/themes/reactwp/template/header.php, the critical CSS from src/themes/reactwp/template/functions.php, and the init function from Loader.js to build an animated panel during the downloading and rendering process.

Lifecycle Promises :


/*
* Detect when the download promise is resolved
*/
window.loader.download.then(() => {});

/*
* Detect when the display promise is resolved
*/
window.loader.display.then(() => {});

/*
* Detect when the init/preloader-panel promise is resolved
*/
window.loader.init.then(() => {});

Extra