Akryum / Akryum/vue-observe-visibility

Accept options when registering plugin to override defaults

Open
#211 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
85
PR merge metrics
No merged PRs in 30d

Description

It would reduce duplication and declutter templates if the plugin allowed overriding defaults:

```js
import Vue from 'vue'
import VueObserveVisibility from 'vue-observe-visibility'

Vue.use(VueObserveVisibility, {
once: true
})
```

If majority of my use cases require `once` to be set to true, then I can just do that, and if I need to set it to false occasionally, I can still do:

```js


```

This applies to all options, and so could also resolve #201.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.