Skip to content

Commit

Permalink
docs(useRafFn): updated docs to more accurately reflect the API, close
Browse files Browse the repository at this point in the history
  • Loading branch information
wheatjs committed Mar 2, 2021
1 parent c52f70f commit 45fbe5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/core/useRafFn/index.md
Expand Up @@ -9,10 +9,14 @@ Call function on every `requestAnimationFrame`. With controls of pausing and res
## Usage

```js
import { ref } from 'vue'
import { useRafFn } from '@vueuse/core'

const { pause, resume } = useRafFn((elapsed) => {
console.log(elapsed.value)
const count = ref(0)

const { pause, resume } = useRafFn(() => {
count.value++
console.log(count.value)
})
```

Expand Down

0 comments on commit 45fbe5a

Please sign in to comment.