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

Replace in navigation

When should you use the replace: true option in navigate?

Answer options

  • Always when navigating to a new page
  • When you want to replace the current history entry instead of adding a new one
  • When you want to clear the entire browser history
  • Only when navigating to the home page

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