UNPKG

strapi-plugin-excel-export-2024

Version:

A strapi plugin used which can be used to download data in xlsx format

27 lines (20 loc) 443 B
/** * * Initializer * */ import { useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import pluginId from '../../pluginId'; const Initializer = ({ setPlugin }) => { const ref = useRef(); ref.current = setPlugin; useEffect(() => { ref.current(pluginId); }, []); return null; }; Initializer.propTypes = { setPlugin: PropTypes.func.isRequired, }; export default Initializer;