DINO – 17-21 Aug 17
Hi. When I pass a new value of a prop
imageUrl to the component Tool I want to run 2 useEffects, first one to reset the rotationDegree value inside the Tool component and the second one to re-run a function that displays an image. My problem now is the second useEffect runs before the first one, so first it displays the image then it resets the rotationDegree to 0 and then it re-displays the images again because the rotationDegree just got changed. This is my code: https://hastebin.com/izakegodiw.typescript I hope I made myself clear. Thanks.Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
