Skip to content

Instantly share code, notes, and snippets.

View ddzirt's full-sized avatar

Oleksandr Bondarenko ddzirt

  • Freelance
  • Kyiv
View GitHub Profile
import fetch, { Headers } from 'node-fetch'
import { NativeModules as RNNativeModules } from "react-native"
import fs from 'fs'
//import { URL, URLSearchParams } from "whatwg-url"
// jest react-native preset does not include fetch implementation in the node environment which RN is providing
global.fetch = fetch
global.Headers = Headers
// In RN 0.59 environment these are not available, emulate for Jest/Node
@ddzirt
ddzirt / android->build.gradle
Created May 24, 2019 09:38
Android with RN 59 gradle settings
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
kotlinVersion = "1.3.0"
@ddzirt
ddzirt / gist:ff0ce070341c000e7cdeb8fd31573927
Created March 10, 2019 19:47 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream