DEV Community

Discussion on: Learn how to create React JS table with delete functionality using API and hooks

 
brmuser9999 profile image
brmuser9999 • Edited

what If I want to route to a different url when view button is clicked to view entire details(initially only id and name is shown and onclick should render a component where all details are seen) based on the passed id .I am not able to route to different component ?

Thread Thread
 
brmuser9999 profile image
brmuser9999

Now suppose I click any of the view buttons from any row ,pass its id to onclick function... do a state change ..set the id to ID and conditionally do routing when ID is set:true ..does that work ?