Skip to content

Instantly share code, notes, and snippets.

@riccardolardi
Created January 31, 2019 13:38
Show Gist options
  • Save riccardolardi/84b90c9dd4103752d39b684b026e84e9 to your computer and use it in GitHub Desktop.
Save riccardolardi/84b90c9dd4103752d39b684b026e84e9 to your computer and use it in GitHub Desktop.
(async () => {
let response, configJson
try {
response = await fetch('./config.json')
configJson = await response.json()
} catch(error) {
configJson = {
"fallback": true
}
}
ReactDOM.render(
<App config={configJson} />, document.getElementById('root'))
serviceWorker.unregister()
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment