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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -