Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

link vs NavLink in React Router

Link and NavLink work almost the same, but NavLink help us to highlt the active link
by provding us with a another attribute called activeClassName={yourClassName},
  which work on active classes.
  So it's better to use NavLink as compare to the Link component.
 
PREVIOUS NEXT
Tagged: #link #NavLink #React #Router
ADD COMMENT
Topic
Name
2+7 =