SHARE
TWEET

Untitled

zidniryi Jan 18th, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import RewardsComponent from 'react-native-rewards';
  2. import React, { Component, createRef } from 'react';
  3. import {TouchableOpacity, Text, StyleSheet} from  'react-native'
  4.  
  5. export default class App extends Component {
  6.   state={
  7.     animationState: 'rest',
  8.   }
  9.  
  10.   render() {
  11.     const { animationState } = this.state;
  12.     return (
  13.       <RewardsComponent
  14.         animationType="confetti"
  15.         state={animationState}
  16.         onRest={() => this.setState({ animationState: 'rest' })}
  17.       >
  18.         <TouchableOpacity
  19.           onPress={() => this.setState({ animationState: 'reward' })}
  20.           style={styles.buttonProps}
  21.         >
  22.           <Text style={{marginTop:200}}>My Name Is Zidni</Text>
  23.         </TouchableOpacity>
  24.       </RewardsComponent>
  25.     )
  26.   }
  27. }
  28.  
  29. const styles = StyleSheet.create({
  30.  
  31. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top