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 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
// Author: @tomzaku from https://gist.github.com/tomzaku/ccda8d03b8a35c92025a84cd14d0369b | |
// import liraries | |
import React, { Component } from 'react'; | |
import _ from 'lodash' | |
// create a component | |
export const isEqualObjectIncludeFunction = (first, second) => { | |
return _.isEqualWith(first, second, (val1, val2) => { | |
// Compare include function |
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
// @flow | |
import { ARKit } from 'react-native-arkit' | |
import { branch, compose, lifecycle, renderComponent } from 'recompose' | |
import { unzip } from 'react-native-zip-archive' | |
import RNFetchBlob from 'react-native-fetch-blob' | |
import React from 'react' | |
const getModelPath = modelId => ( | |
`${RNFetchBlob.fs.dirs.CacheDir}/models/${modelId}/` | |
) |
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 com.facebook.react.bridge.Arguments | |
import com.facebook.react.bridge.WritableArray | |
import com.facebook.react.bridge.WritableMap | |
fun writableMapOf(vararg values: Pair<String, *>): WritableMap { | |
val map = Arguments.createMap() | |
for ((key, value) in values) { | |
when (value) { | |
null -> map.putNull(key) | |
is Boolean -> map.putBoolean(key, value) |
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 React, { PureComponent } from 'react'; | |
import { InteractionManager } from 'react-native'; | |
class WaitForUI extends PureComponent { | |
constructor(props) { | |
super(props); | |
this.state = { | |
interactionsComplete: false, | |
}; | |
} |