Skip to content

Instantly share code, notes, and snippets.

View ernest-okot's full-sized avatar
😛

Ernest Okot ernest-okot

😛
View GitHub Profile
@dillonhafer
dillonhafer / Example.js
Created July 9, 2018 19:31
Expo Document Picker workaround
import React, { Component } from 'react';
import {
View,
Text,
TouchableOpacity,
} from 'react-native';
import WebViewHack from './WebViewHack';
class ImportFileScreen extends Component {
@oxling
oxling / memory.js
Created August 18, 2012 15:34
Closure memory management in JavaScript
/* largeString will be included with the returned function,
making the closure large. */
function makeLargeClosure() {
var largeString = new Array(1000).join('0123456789');
return function() {
console.log(largeString);
}
}
/* largeString isn't used in the closure, even though it's in scope.