/rotate-react

Primary LanguageJavaScriptMIT LicenseMIT

rotate-react

Introduction

A react hook of rotating specified element

Version License

Install

Install rotate-react by using

  npm i doodle-rotate-react

or

  yarn add doodle-rotate-react

Usage

import useRotate from 'doodle-rotate-react'
....
const {target}  = useRotate()
return (
  <>
    ...
    <div ref= {target} className='specified'>
    </div>
    ...
  <>
)