App.js 790 Bytes
import React from 'react';
import {RecoilRoot} from 'recoil';
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import Landing from './Landing';
import Main from './Main';
import Result from './Result';


class App extends React.Component {
    render() {
        return (
            <RecoilRoot>
                <Router>
                    <Switch>
                        <Route exact path="/landing" component={Landing} />
                        <Route exact path="/main" component={Main} />
                        <Route exact path="/result" component={Result} />
                        <Redirect path="*" to="/landing" />
                    </Switch>
                </Router>

            </RecoilRoot>

        );
    }
}

export default App;