Share Posted April 5, 2022 (edited) I've been running into a lot of issues using .from and .to with opacity tweens with React so I did a simple example to demonstrate. .from seems to just stop before the full tween when used in react and .to doesn't animate. Opacity Tween stops in React (You can switch .from to .to and still no dice) https://codesandbox.io/s/proud-dawn-uic35x Same tween works in Vanilla - CodePen Solution: This thread now addresses a larger issue between first render animations and React 18's useEffect empty dependency array's new "double" render in development mode - so I wanted to point to the specific solution by @Cassie to the original question as it does solve the issue. See the Pen WNdMbob by omarel (@omarel) on CodePen Edited June 30, 2022 by omarel Pointing out Solution as thread grows to the larger issue Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now