Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation incomplete for bind #47

Open
Globerada opened this issue Oct 31, 2018 · 1 comment
Open

Documentation incomplete for bind #47

Globerada opened this issue Oct 31, 2018 · 1 comment

Comments

@Globerada
Copy link

Globerada commented Oct 31, 2018

Hi. Thanks for the plugin. I am going to use it with nuxt (only on client side, of course).
Just to let you know that the README is a bit incomplete. First of all, lacks of examples. Secondly, you forgot to mention that in order to bind to work, you must specify into the options:

  localStorage: {
    someObject: {
      type: Object,
      default: {
        hello: 'world'
      },
      bind: true
    }
}

From index.js

 if ((bind || config.bind) && config.bind !== false) {
              this.$options.computed = this.$options.computed || {}`
}
@checkyourmath
Copy link

Thanks @Globerada for pointing it up.
Vue.use(VueLocalStorage, { bind: true }); makes no effect in my case.
Have to set bind: true per each binding.

Also thanks for the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants