当我单击用户图像时,URL中的ID更改了(“ / r /:id”),但页面内容保持不变。
<BrowserRouter>
<Switch>
<Route path="/r/:id" component={View} />
</Switch>
</BrowserRouter>,
<Link
to={{
pathname: `/r/${item.uid}`,
state: item,
}}
>
<div className="video-overlay" >
<div className="imagepop" >
<div className="box-imag" >
<img
alt="#"
className="img-responsive img-over"
src={(item.cover) || two}
/>
</div>
</div>
</div>
</Link>
答案 0 :(得分:0)
尝试使用此代替:
<!DOCTYPE HTML>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Lora:400,700|Montserrat:300" rel="stylesheet">
</head>
<body>
<div class="removable_item_container">
<div class="removable_item_text">Removable item</div>
<div class="removable_item_remove">x</div>
</div>
<script>
</script>
</body>
</html>