Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Highlight current nav link in react

import { NavLink } from 'react-router-dom';

<NavLink to='about' activeClassName="active">about</NavLink>

// Or specifing active style
<NavLink to='about' activeStyle={{color: "red"}}>about</NavLink>

// If you use deep routes and you need an exact match
<NavLink exact to='about/subpath' activeClassName="active">about</NavLink>
Comment

PREVIOUS NEXT
Code Example
Javascript :: como instalar la nueva version de node-js en ubuntu 
Javascript :: angular keyframes % 
Javascript :: disable eslint curly option 
Javascript :: heroku proxy cross origin 
Javascript :: (node:3644) UnhandledPromiseRejectionWarning: TypeError [EMOJI_TYPE]: Emoji must be a string or GuildEmoji/ReactionEmoji 
Javascript :: javascript read file 
Javascript :: js deep copy 
Javascript :: jquery clone table row 
Javascript :: javascript tag 
Javascript :: html to jsx 
Javascript :: register service worker 
Javascript :: run another process on nodejs process exit 
Javascript :: string js 
Javascript :: build json object 
Javascript :: delete value from json array with index 
Javascript :: back button not working when modal open in react native 
Javascript :: how to use moment to compare time for calendar change color 
Javascript :: how to add elements into an array in javascript 
Javascript :: joi number of digits 
Javascript :: how to keep a child window always on top in electron js 
Javascript :: how to write a function in javascript 
Javascript :: javascript wait to execute function on keyup 
Javascript :: react state not updating immediately 
Javascript :: forward and reverse loop one by one js 
Javascript :: dynamic classes in react 
Javascript :: javascript for pop up 
Javascript :: ternary operator js 
Javascript :: angular pipe paramerte 
Javascript :: formdata 
Javascript :: get file extension of path extendscript 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =