We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I create a Custome Component With these props:
opacity: PropTypes.number, // opacity;
In one page I use this to make it support animate.
const AnimatedProgress = Animated.createAnimatedComponent(RecorderProgress);
then , I set a percentage state.
this.state= { _opacity: new Animated.Value(0)}
and set a animate in componentDidMount;
Animated.timing(this.state._opacity,{ toValue:1, // no-transparent; duration:5000 }).start();
add the component to page:
<AnimatedProgress opacity={opacity:this.state._opacity}/>
But when I run the app, there is no animation of the component.
I also found that if I create a opacity in style of the component directly, the animation works.
<AnimatedProgress style={{opacity:this.state._opacity}}/>
Please it's very confused me, is there any one who can help me?Thanks.
The text was updated successfully, but these errors were encountered:
This type of question is best posted in Stack Overflow.
This book by @browniefed is a really good start.
http://browniefed.com/react-native-animation-book/API.html
Sorry, something went wrong.
I have fixed that which is due to add a setNativeProps(props) method to the custom component.I remove the method and it works as excepted now.
No branches or pull requests
I create a Custome Component With these props:
In one page I use this to make it support animate.
then , I set a percentage state.
and set a animate in componentDidMount;
add the component to page:
But when I run the app, there is no animation of the component.
I also found that if I create a opacity in style of the component directly, the animation works.
Please it's very confused me, is there any one who can help me?Thanks.
The text was updated successfully, but these errors were encountered: