Turn on flow for index.js

Test plan: `yarn travis` passes
This commit is contained in:
Dandelion Mané 2018-05-08 11:50:52 -07:00
parent 57682065fd
commit c2fb88b11a
1 changed files with 6 additions and 2 deletions

View File

@ -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();