React-router routing problem

class R1 extends React.Component{
    render(){
        return <div>1</div>
    }
}

class R2 extends React.Component{
    render(){
        return <div>2</div>
    }
}

class Rts extends React.Component{
    render(){
        return  <div>
            <Route path="/" component={R1}></Route>
            <Route  path="/R" component={R2}></Route>
        </div>  
    }
}



const render = () => {
    ReactDOM.render(
        <Router history={createHistory}>         
            <Rts/>
        </Router>,
        document.querySelector("-sharpapp")
    )
}
render();

http://localhost:8080/R results in Cannot GET / R
I am angry

Feb.17,2022

<Route exact path="/" component={R1}></Route>
<Route path="/R" component={R2}></Route>

need to introduce

import {hot} from 'react-hot-loader';
import { Switch, HashRouter, Route} from 'react-router-dom';   
class R1 extends React.Component{
    render(){
        return <div>1</div>
    }
}

class R2 extends React.Component{
    render(){
        return <div>2</div>
    }
}

@hot(module)
class Rts extends React.Component{
    render(){
        return  <div>   
                    <HashRouter> 
                        <Switch>
                            <Route exact={true} path="/" component={R1}></Route>
                            <Route exact={true} path="/r2" component={R2}></Route>
                        </Switch>   
                    </HashRouter>
                 </div>  
    }
}

const render = () => {
    ReactDOM.render(               
            <Rts/>
       ,
        document.querySelector('-sharpapp')
    )
}
render();

remember @ hot (module) , so that's fine

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2516b-33731.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2516b-33731.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?