Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RewardsComponent from 'react-native-rewards';
- import React, { Component, createRef } from 'react';
- import {TouchableOpacity, Text, StyleSheet} from 'react-native'
- export default class App extends Component {
- state={
- animationState: 'rest',
- }
- render() {
- const { animationState } = this.state;
- return (
- <RewardsComponent
- animationType="confetti"
- state={animationState}
- onRest={() => this.setState({ animationState: 'rest' })}
- >
- <TouchableOpacity
- onPress={() => this.setState({ animationState: 'reward' })}
- style={styles.buttonProps}
- >
- <Text style={{marginTop:200}}>My Name Is Zidni</Text>
- </TouchableOpacity>
- </RewardsComponent>
- )
- }
- }
- const styles = StyleSheet.create({
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement