Auto start animation.
See original GitHub issueDescription
Hi guys, I have faced the problem. I just want to animate background image when component is loaded… I wrote a couple of lines, but I don’t understand what to do next 😃
Code
import Animated, { useSharedValue } from 'react-native-reanimated';
...
const SplashScreen = ({ ready, onLoading }: SplashScreenProps) => {
const scale = useSharedValue(0);
useEffect(() => {
if (!ready) {
(async () => {
await RNSplashScreen.hideAsync();
})()
}
}, [ready]);
return (
<ImageBackground
source={picture[0]}
style={{
flex: 1,
justifyContent: "flex-end"
}}
>
<Animated.Image
style={[
{
transform: [{ scale }],
},
]}
source={picture[1]}
/>
</ImageBackground>
)
};
- Use expo
- React: 16.11.0
- React Native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz
- React Native Reanimated: 2.0.0-alpha.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
PowerPoint plays animations automatically even with start on ...
Hi guys, I'm facing a weird problem with PowerPoint. I have some animations applied in one of my slides, some are set to...
Read more >Make PowerPoint Presentation Automatic | Cedarville University
Click the [Animations] tab > From the "Advanced Animation" group, click "Animation Pane". Right-click the first animation > Select "Start With Previous". This ......
Read more >How can I start auto start an animation without onActive, and ...
You can use the Animatable API and the LaunchedEffect composable. You don't need a boolean to start the animation. Something like:
Read more >Auto-Animate | reveal.js
Auto -Animate 4.0.0. reveal.js can automatically animate elements across slides. All you need to do is add data-auto-animate to two adjacent slide <section> ......
Read more >Can my PowerPoint animation start automatically? - BigMarker
How to Enable Automatic PowerPoint Animation · On your Channel, go to the Channel Settings. · On the Channel Settings page, scroll down...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I agree. I answered only on
start something when animation is finished
. Correct animation implementation was out of scope of my answer 😉I would not recommend to use this approach:
Because it might run the animation even before the component renders on some low-end devices or with some heavy components.
I mean for the autorun option.