Last active
February 8, 2021 12:02
-
-
Save watilde/dfc6fd301aafbe98db5dc48eed360370 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Amplify from 'aws-amplify'; | |
import awsconfig from './aws-exports'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import monitorErrors from './monitorErrors'; | |
import monitorWebVitals from './monitorWebVitals'; | |
Amplify.configure(awsconfig); | |
ReactDOM.render( | |
<React.StrictMode> | |
<App /> | |
</React.StrictMode>, | |
document.getElementById('root') | |
); | |
// If you want to start measuring performance in your app, pass a function | |
// to log results (for example: reportWebVitals(console.log)) | |
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals | |
reportWebVitals(monitorWebVitals); | |
// To capture errors and report through Kinesis Stream | |
// Learn more: https://docs.amplify.aws/lib/analytics/streaming/q/platform/js#installation-and-configuration | |
window.onerror = monitorErrors; | |
window.onunhandledrejection = monitorErrors; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment