Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

router in next js

import { useRouter } from 'next/router';
const NavComponent = ({navItems,logo})=> {
const router = useRouter()
return (
     <div onClick={() => {
            router.push('/');
          }}
          className="h-auto transition cursor-pointer hover:scale-105"
        >
          <h4 className="text-2xl text-white uppercase font-neuro hover:text-secondary text-shadow">Straw Hats</h4>
        </div>
)}
Comment

PREVIOUS NEXT
Code Example
Javascript :: A bad HTTP response code (404) was received when fetching the script. 
Javascript :: vscode shortcut to search for file 
Javascript :: min heap javascript 
Javascript :: js listen localstorage change 
Javascript :: javascript fullscreen 
Javascript :: state hook is not updating react 
Javascript :: use these instead of a for loop javascript 
Javascript :: find smallest number in array javascript using for loop 
Javascript :: how to get last child element in javascript 
Javascript :: console javascript 
Javascript :: going through every attributes of an object javascript 
Javascript :: vue add external script 
Javascript :: js select last item in html list query selector 
Javascript :: get ini file with node js 
Javascript :: bracket notation javascript 
Javascript :: jszip create zip file 
Javascript :: how play audio js 
Javascript :: javascript require 
Javascript :: get last character of string javascript 
Javascript :: javascript cartesian product 
Javascript :: setinterval javascript 
Javascript :: react - min & max for dates 
Javascript :: jquery find element before 
Javascript :: how to add eslint to react project 
Javascript :: js === 
Javascript :: move element to the top of list javascript 
Javascript :: escaped json to json javascript 
Javascript :: nuxt add plugin 
Javascript :: Material-UI: A component is changing the default value state of an uncontrolled Select after being initialized. To suppress this warning opt to use a controlled Select. 
Javascript :: months js 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =