Raghul Ramkish
Raghul Ramkish

Reputation: 101

Passing the dynamic URL in routing

I am trying to pass the dynamic URL for routing.

<DropdownItem value={age} id="dropdown-menu-align-right" to="/admin/viewaccount?id="{age} tag={Link}>

I am just trying to append the parameter age in to path but it showing me error,

What is the way to archive this.

Upvotes: 0

Views: 15

Answers (1)

Raghul Ramkish
Raghul Ramkish

Reputation: 101

I think i found the answer,

<DropdownItem value={age} id="dropdown-menu-align-right" to={`/admin/viewaccount?id=${age}`} tag={Link}>

Thanks you

Upvotes: 2

Related Questions