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: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
1 Reply
This thread hasn’t had any activity in 12 hours, so it’s now locked.
Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/902647189120118794/1009512219207270420
Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question:
https://stackoverflow.com/help/how-to-ask
http://wp.me/p2oIwo-26