import React from "react" import { BrowserRouter as Router, Route, Switch, Redirect } from "react-router-dom" import { AnimatedSwitch } from 'react-router-transition' import ReactModal from "react-modal" import Pastebin from "./pastebin" import BinaryUpload from "./binaryUpload" import FileViewerDispatcher from "./fileViewerDispatcher" class Home extends React.Component constructor: (props) -> super props @state = dialogOpen: false dialogMsg: null openDialog: (msg) => @setState dialogOpen: true dialogMsg: msg render: ->
{ # Use `render` instead of `component` to prevent re-rendering the child # when parent is re-rendered (however this prevents passing match props) } } /> } />
{ # Provide modal dialog for all child # passed through the openDialog prop }

{@state.dialogMsg}

export default Home