DEV Community

Discussion on: Is it bad practice to make a POST call in useEffect?

Collapse
 
rokkoo profile image
Alfonso

From my point of view if you construct your getCropData inside a useCallback and adding the cropper as a dependency your problem will be solved because the state of your function will always sync with your data because of the dependency.