This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Based on this http://jsfiddle.net/brettwp/J4djY/*/ | |
function detectDoubleTapClosure() { | |
let lastTap = 0; | |
let timeout; | |
return function detectDoubleTap(event) { | |
const curTime = new Date().getTime(); | |
const tapLen = curTime - lastTap; | |
if (tapLen < 500 && tapLen > 0) { | |
console.log('Double tapped!'); | |
event.preventDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// external-link.js | |
import React from 'react'; | |
import { TouchableOpacity, StyleSheet, Text, Linking } from 'react-native'; | |
const ExternalLink = (props) => { | |
const { url, children, style = {} } = props; | |
const onPress = () => Linking.canOpenURL(url).then(() => { | |
Linking.openURL(url); |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just