zucchetti-sa5/themes/onepirate/modules/form/defer.js
Arnaud Fauconnet 328a760eb8 added theme
2022-10-28 11:41:58 +02:00

16 lines
303 B
JavaScript

import * as React from 'react';
export default function defer(Component) {
function Defer(props) {
const [mounted, setMounted] = React.useState(false);
React.useEffect(() => {
setMounted(true);
}, []);
return <Component mounted={mounted} {...props} />;
}
return Defer;
}