Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@uptown
Created June 13, 2019 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uptown/b34df49e976cff3f5fa6c1024f29a61d to your computer and use it in GitHub Desktop.
Save uptown/b34df49e976cff3f5fa6c1024f29a61d to your computer and use it in GitHub Desktop.
import React, {useState} from 'react'
const HoverAnimation = () => {
const [triggered, setTriggered] = useState(false);
return <div onMouseEnter={() => setTriggered(true)} class={triggered? 'animation-class': 'default-class'} />;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment