import React, { Component } from 'react'; import { Platform, TouchableOpacity, TouchableNativeFeedback, View, Text } from 'react-native'; function _handlePress(callback){ requestAnimationFrame(callback) } const Button = (props) => { return ( Platform.OS === 'ios' ? _handlePress(props.onPress)}>{props.children} : _handlePress(props.onPress)}>{props.children} ) } Button.defaultProps = { onPress : () => {} } export default Button;