Open Uttu316 opened 4 years ago
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;
The createAnimatableComponent does not accept Functional components. It is asking to change the functional component to class component. Solove this Issue.