我有一个带有URL的搜索表单,例如localhost:3000 / search?keyword = xxx&subject = AAA&filter2 = BBB等。如何为URL创建反应路径,以便用户可以为搜索添加书签?我的index.js代码如下:
import { Route, Link, BrowserRouter as Router } from 'react-router-dom';
const routing = (
<Router>
<div>
<Route path="/" component={App} />
</div>
</Router>
)
ReactDOM.render(routing, document.getElementById('root'))