Put in order · Next.js course · Module 7: Authentication and Authorization

redirect Syntax from next/navigation

Arrange the import and usage syntax of redirect

Items to put in order

  • from 'next/navigation'
  • redirect('/path')
  • if (condition)
  • import { redirect }

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