Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to link to a different component in reactjs without react router

const showComponent = (route, component) => {
  return window.location.pathname === route ? component : null
}
Source by ncoughlin.com #
 
PREVIOUS NEXT
Tagged: #link #component #reactjs #react #router
ADD COMMENT
Topic
Name
6+5 =