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
import { AppState } from 'react-native'; | |
import timeoutfix from './src/time-out-fix-util'; | |
console.disableYellowBox = true; | |
class App extends Component { | |
async componentWillMount() { | |
timeoutfix(); |
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
import timeoutfix from './src/time-out-fix-util'; | |
console.disableYellowBox = true; | |
class App extends Component { | |
async componentWillMount() { | |
timeoutfix(); | |
} | |
// in your render method return what you normall would just make sure | |
// timeoutfix() is called in async componentWillMount() |
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
import { AppState } from 'react-native'; | |
import timeoutfix from './src/time-out-fix-util'; | |
console.disableYellowBox = true; | |
class App extends Component { | |
async componentWillMount() { | |
timeoutfix(); |
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
import { AppState } from 'react-native'; | |
import timeoutfix from './src/time-out-fix-util'; | |
console.disableYellowBox = true; | |
class App extends Component { | |
async componentWillMount() { | |
timeoutfix(); |
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
import { Platform, InteractionManager } from 'react-native'; | |
const timeoutFix = () => { | |
const _setTimeout = global.setTimeout; | |
const _clearTimeout = global.clearTimeout; | |
const MAX_TIMER_DURATION_MS = 60 * 1000; | |
if (Platform.OS === 'android') { | |
const timerFix = {}; | |
const runTask = (id, fn, ttl, args) => { |
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
function generateRandomInteger(min, max) { | |
return Math.floor((Math.random() * max) + min); | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.