how to make link without router in react code example
Example: how to link to a different component in reactjs without react router
const showComponent = (route, component) => {
return window.location.pathname === route ? component : null
}
const showComponent = (route, component) => {
return window.location.pathname === route ? component : null
}