javascript - React-router <NavLink> component doesn't get active after click on it -


here's code of component use <navlink> react-router-dom library. after click on , url changes once specified in to prop styles specify in activestyle prop don't appear supposed to.

import react, { component } 'react' import { navlink } 'react-router-dom' import styles './../../styles/components/listlabel.css'  class listlabel extends component {   render() {     const { name, id } = this.props      return (       <navlink         to={`/list/${id}`}         style={{ textdecoration: 'none', color: 'inherit' }}         activestyle={{ fontweight: 'bold' }}       >         <div classname={styles['list-label']}>           <div classname={styles['name']}>             {this.props.name}           </div>           <i classname={styles['settings-button']} />         </div>       </navlink>     )   } }  export default listlabel 

here's route:

<content>   <route path="/list/:listid" component={listcontent} /> </content> 

what wrong?


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -