我有以下結構:從反應路由器我的鏈接標籤不會改變我的
<CategoryRecipesList>
<Title> Recipes for {this.props.category} </Title>
<Mesh> You can also click on : {categoryList.map(el => <Link to={'categories/' + el}>{el}</Link>} </Mesh>
<Grid>
recipes.map((s, i) => <Card {...s}/>)
</Grid>
</CategoryRecipesList>
我有獲取recipes
根據category
PARAM列表中的所屬分類組件上的構造函數。
當我點擊<Link/>
標記時,標題和網址更新,但不是網格中的<Card>
。
有沒有人有任何線索?
感謝。我編輯了我的問題,以更加明確地解釋我的鬥爭。 –
@StanAmsellem我更新了我的答案。嘗試包裝_Card_組件。 –
不幸的是它不起作用 –