react-native-animatable
react-native-animatable copied to clipboard
Does not accepts Functional Components
The createAnimatableComponent does not accept Functional components. It is asking to change the functional component to class component. Solove this Issue.
Following the guide here: https://dev-yakuza.github.io/en/react-native/react-native-animatable/
get the same Invariant Violation: createAnimatedComponent does not support stateless functional components; use a class component instead.
maybe you can use createAnimatableComponent to the used components first (?)
const SomeComponent = (props) => {
.
.
.
const AnimatedView = createAnimatableComponent(View);
const renderWelcomeText = () => (
<AnimatedView animation="fadeIn">
<Text style={styles.welcomeText}>Welcome!</Text>
<Text style={styles.usernameText}>{username}</Text>
</AnimatedView>
);
.
.
.
}
export default SomeComponent;