Skip to content

Instantly share code, notes, and snippets.

@vitorbritto
Last active May 14, 2023 19:00
Show Gist options
  • Save vitorbritto/91ac48406bf1e007041b3ff989d2b27a to your computer and use it in GitHub Desktop.
Save vitorbritto/91ac48406bf1e007041b3ff989d2b27a to your computer and use it in GitHub Desktop.
React Error Boundary - App
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { AppError } from './components/AppError';
ReactDOM.render(
<React.StrictMode>
<AppError>
<App />
</AppError>
</React.StrictMode>,
document.getElementById('root')
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment