RouteSystem.jsx

28 lines | 504 B Blame History Raw Download



class RouteSystem extends React.Component {

    constructor(props) {
        super(props);
        console.log('RouteSystem start');
    }

    render() {
        return (
            <Router>
                <Switch>
                    <Route path="/" component={() => <App ID="-1" />} />
                    <Route path="/?ID=:ID" component={App} />
                </Switch>
            </Router>
        );
    }
}

ReactDOM.render(
    <RouteSystem />,
    document.getElementById("app")
)