mahdi
7 سال پیش توسط mahdi مطرح شد
0 پاسخ

سورس کد کتابخانه react native animatable

سلام
کدی در پایین دارم که می درکش نمی کنم، خواستم بی زحمت دوستان توضیح بدن چه کاری انجام می ده:

import React, { Component } from 'react';
import * as Animatable from 'react-native-animatable';
import {Text, TouchableWithoutFeedback} from 'react-native';

export default class Test extends Component {
    handleViewRef = ref => this.view = ref;
    bounce = () => this.view.bounce(۸۰۰).then(endState => console.log(endState.finished ? 'bounce finished' : 'bounce cancelled'));
    render() {
        return (
            <TouchableWithoutFeedback onPress={this.bounce}>
                <Animatable.View ref={this.handleViewRef}>
                    <Text>Bounce me!</Text>
                </Animatable.View>
            </TouchableWithoutFeedback>
        );
    }
}

this.view رو اصلا نمی فهمم که چیه و چرا باید فراخوانی بشه.
ممنون