Skip to content

Instantly share code, notes, and snippets.

@watilde
Last active February 8, 2021 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watilde/dfc6fd301aafbe98db5dc48eed360370 to your computer and use it in GitHub Desktop.
Save watilde/dfc6fd301aafbe98db5dc48eed360370 to your computer and use it in GitHub Desktop.
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