Extended react hook for Josh Comeau's boop effect
npm install --save react-spring use-boop
import useBoop from 'use-boop';
import { animated } from 'react-spring';
const SomeComponent = () => {
const [style, trigger] = useBoop({ rotation: 45 });
return (
<animated.div style={style} onMouseEnter={trigger}>
{/* Child can be anything */}
<AiOutlineQuestionCircle size={80} />
</animated.div>
);
};