diff --git a/src/PluginWrapper.js b/src/PluginWrapper.js index fd27c2caf..059bec44c 100644 --- a/src/PluginWrapper.js +++ b/src/PluginWrapper.js @@ -1,15 +1,12 @@ import { DashboardPluginWrapper } from '@dhis2/analytics' import { debounce } from 'lodash/fp' -import React, { useEffect, useLayoutEffect, useState } from 'react' +import React, { useLayoutEffect, useState } from 'react' import { Plugin } from './components/plugin/Plugin.js' import './locales/index.js' const PluginWrapper = (props) => { - const [propsFromParent, setPropsFromParent] = useState(props) const [renderId, setRenderId] = useState(null) - useEffect(() => setPropsFromParent(props), [props]) - useLayoutEffect(() => { const updateRenderId = debounce(300, () => setRenderId((renderId) => @@ -23,7 +20,7 @@ const PluginWrapper = (props) => { }, []) return ( - + {(props) => } )