INNER CODE UNIT · JavaScript
Toast
crazycodeboy/react-native-easy-toast · index.js:28
export default class Toast extends Component {
constructor(props) {
super(props);
this.state = {
isShow: false,
text: '',
opacityValue: new Animated.Value(this.props.opacity),
}
}
show(text, duration, callback, onPress) {
this.duration = typeof duration === 'number' ? duration : DURATION.LENGTH_SHORT;
this.callback = callback;
console.log(typeof onPress)
if(typeof onPress === 'function')
this.onPress = onPress
this.setState({