Skip to content

Instantly share code, notes, and snippets.

View torrens's full-sized avatar

Mark Torrens torrens

  • London
View GitHub Profile

Keybase proof

I hereby claim:

  • I am torrens on github.
  • I am marktorrens (https://keybase.io/marktorrens) on keybase.
  • I have a public key ASBvd47zbZsVP1G4sOA99HMHlMVva8gR9S0Ujze938YjpQo

To claim this, I am signing this object:

@torrens
torrens / ftgist.md
Last active August 26, 2017 20:35
FT Test
  1. 9,undefined is returned due to variable hoisting and duplicate definition rules in Javascript. The second function foo() is called because it is declared last. The first function bar() is called because functions are hoisted above variables in the same function in Javascript.

  2. Here is the code to request several URLs.

/*
Promise.all is fail fast, so make all promises successful.
Use a result object to store the request status.
@torrens
torrens / gist:9ef3e5a13c0bcb528bc7a366247305cc
Created July 14, 2017 11:15
react-navigation screen instance access
// Main Navigator
const LanguageSelectorScreenWrapper = ({ navigation }) => (
<LanguageSelectorScreen navigation={navigation} registerAsListener={registerAsListener}/>
);
const App = StackNavigator({
LanguageSelectorScreen: {screen: LanguageSelectorScreenWrapper },
},
{