Turn on flow for index.js
Test plan: `yarn travis` passes
This commit is contained in:
parent
57682065fd
commit
c2fb88b11a
|
@ -1,9 +1,13 @@
|
||||||
// @no-flow
|
// @flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
import registerServiceWorker from "./registerServiceWorker";
|
import registerServiceWorker from "./registerServiceWorker";
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById("root"));
|
const root = document.getElementById("root");
|
||||||
|
if (root == null) {
|
||||||
|
throw new Error("Unable to find root element!");
|
||||||
|
}
|
||||||
|
ReactDOM.render(<App />, root);
|
||||||
registerServiceWorker();
|
registerServiceWorker();
|
||||||
|
|
Loading…
Reference in New Issue