I am trying to create this HOC–>
export const hocGrid = (Grid) => {
return ({ data, config, id = uuidv4(), adaptableReady, autosizeAllColumns, removeLoader }) => {
return (
<Grid data={data} config={config} id={id} adaptableReady={adaptableReady} autosizeAllColumns={autosizeAllColumns} removeLoader={removeLoader} />
)
}
}
this Grid
component receives data and config as props, data is array of object and config is object
I want to modify these data and config and then pass to Grid
. Is this possible through HOC?