Created
January 31, 2019 13:38
-
-
Save riccardolardi/84b90c9dd4103752d39b684b026e84e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(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