I have a React component <Grid />
which renders <SubGrid />
Now <grid />
is receiving props data and config.
My Grid Component is has a useEffect-
useEffect(() => {
prepareAdaptableOptions();
}, [data, config]);
this useEffect has some code to deepclone data and config and then pass it down to <SubGrid />
Now my issue is – whenever <Grid />
is rendererd my subgrid
updates on DOM ie., DOM is manipulated. even tho data and config that I passed are same.
And If I remove data, config from array of dependency then this useEffect does not even trigger when data and config is changed?
How do I resolve this issue ?