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
const doFetch = (url, opts = {}) => { | |
const headers = new Headers() | |
headers.append('Cache-Control', 'max-age=0') | |
if (opts.headers) { | |
for (const header of opts.headers) { | |
headers.append(header[0], header[1]) | |
} | |
} | |
return new Promise((resolve, reject) => { | |
fetch(url, { |
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
package com.cachetester; | |
import com.facebook.react.bridge.ModuleSpec; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.modules.network.NetworkingModule; | |
import com.facebook.react.modules.network.OkHttpClientProvider; | |
import com.facebook.react.shell.MainReactPackage; | |
import java.io.File; |
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 PerfMonitor from 'react-native/Libraries/Performance/RCTRenderingPerf'; | |
PerfMonitor.toggle(); | |
PerfMonitor.start(); | |
class App extends Component { | |
componentDidMount() { | |
setTimeout(() => { | |
PerfMonitor.stop(); | |
}, 8000); | |
} |
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 strict'; | |
var path = require('path'); | |
var config = { | |
getProjectRoots() { | |
return getRoots(); | |
}, | |
getAssetRoots() { |