Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

back button next js

import { useRouter } from 'next/router'

export default function Page() {
  const router = useRouter()

  return <span onClick={() => router.back()}>Click here to go back</span>
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #button #js
ADD COMMENT
Topic
Name
4+3 =