React Components are not getting rendered in react routes -
i trying create footer react, other components not getting displayed when click on link in footer.
main.js
const main = () => (     <main>     <switch>        <route path='/' component= {searchpage}/>        <route path='/about' component={aboutpage}/>        <route path='/home' component={homepage}/>   </switch>      </main>  );   footer.js
const footer = () => {      return (         <footer>         <div classname="navbar navbar-inverse navbar-fixed-bottom">         <div classname="container">         <nav>             <navlink to="/home" activeclassname="active">home</navlink> {" | "}             <navlink to="/about" activeclassname="active">about us</navlink> {" | "}           </nav>     </div>     </div>     </footer>          );   app.js
const app = ()=> (     <div>         <main/>         <footer/>   </div> );   the problem components not getting rendered if click on link.
what need resolve this?
 
 
Comments
Post a Comment