Loaders

Some HomeflowJS components will automatically render a loader while some action is waiting to be completed (lazy-loading, waiting for a form submission etc).

The default loader consists of some animated circles. You can override this with either a React component or an HTML string:

import React from 'react';
const CustomLoader = () => (
<div className="my-custom-loader">
{/* Custom loader JSX */}
</div>
);
Homeflow.set('custom_loader_component', CustomLoader);

OR

const customLoaderHTML = '<div class="my-custom-loader"></div>';
Homeflow.set('custom_loader_html', customLoaderHTML);