Question · JavaScript and React course · Module 6: React Router

Link vs NavLink

What is the key difference between the Link and NavLink components?

Answer options

  • Link opens in a new tab, NavLink in the same tab
  • NavLink can pass state, Link cannot
  • Link is faster than NavLink
  • NavLink automatically adds CSS classes for the active state

You can check the correct answer by solving this task in the CodeWorlds game.