In react, I want to use this code to link the detail page in my main list page. This is the react code:
{
title: 'more',
render: (val, row) => {
return (<Link to={`/zhuolian/activity/detail/${row.id}`}>more...</Link>);
},
},
and this is my route config:
{
path: '/zhuolian',
name: 'zhuolian',
icon: 'contacts',
routes:[
{
path: '/zhuolian/activity',
name: 'activity',
hideChildrenInMenu: true,
component: './xRepo/Activity',
routes:[
{
path: '/zhuolian/activity/detail/:activityId',
name: 'detail',
component: './xRepo/Activity/detail',
},
]
},
]
},
I am now using the router version "react-router-dom": "^4.3.1", and when I click on more, the log shows this warning:
index.js:1 Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack
and it did not navigate to the detail page. I have tried to add the replace in the link component but it still did not work. Am I missing something? What should I do to make it link to another detail page when I click more?