javascript - react-router-dom jump problem js
某草草
某草草 2017-06-22 11:54:24
0
1
807

The settings are as follows:

<Route path="/first" component={First} />
            <Route path="/first/:id" component={FirstDetail} />

The problem is: when the first page jumps to the first:/id page, the page will not be refreshed and the content will be appended. Is there any good method? , these two routes correspond to different pages

某草草
某草草

reply all(1)
代言
import {Switch} from 'react-router-dom';

....


<Switch>
    <Route path="/first" exact component={First} />
    <Route path="/first/:id" component={FirstDetail} />
</Switch>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!