How to optimize PreRender to React?

Hi all. Can you guys tell me how to optimize, what would PreRender was only in the case if you have changed your prop cDOptions?
Tried these ways, but failed:
const memoizedCallback = useCallback(
 () => {
return memoizedCallback

const memoizedValue = useMemo(() => setCDOptions(setOptions()), [cDOptions])
return memoizedValue
April 19th 20 at 12:19
0 answer

Find more questions by tags React