dx: Upgrade from legacy method UNSAFE_componentWillMount
With this MR, I remove the usage of React's legacy method componentWillMount
and move the animations' initialization logic to the constructor as recommended by React's documentation.
I also removed an unnecessary value initialization on line 58
because the value is always 0
before setting it again (the value is set to 0 on initialization and unmounting by the _exit
method).
I tested the component is still working correctly on a Pixel 4 with Android 11.
Note: please merge after MR !151 (merged)