forked from breatheco-de/exercise-terminal-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (26 loc) · 823 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from "react";
import PropTypes from "prop-types";
import ReactDOM from "react-dom";
import { AppContainer } from "react-hot-loader";
import Redbox from "redbox-react";
import Presentation from "./slides";
const CustomErrorReporter = ({ error }) => <Redbox error={ error } />;
CustomErrorReporter.propTypes = {
error: PropTypes.instanceOf(Error).isRequired
};
ReactDOM.render(
<AppContainer errorReporter={CustomErrorReporter}>
<Presentation />
</AppContainer>,
document.getElementById("root")
);
if (module.hot) {
module.hot.accept("./slides", () => {
const NextPresentation = require("./slides").default; ReactDOM.render(
<AppContainer errorReporter={CustomErrorReporter}>
<NextPresentation />
</AppContainer>,
document.getElementById("root")
);
});
}