Reactjs – How to set state after get value from function?
May i know how to set state value after get value from function? const getValueFunction = () => { dispatch(fetchData(setData, 1, pages.current, rowsNumber)); } useEffect(() => { pages.current = 1; getValueFunction(); const obj = data.reduce((r, { setCode }) => {…