cklmercer / vue-stash

Easily share reactive data between your Vue components.
MIT License
403 stars 29 forks source link

Using functions inside the store #25

Closed KINKCreative closed 6 years ago

KINKCreative commented 6 years ago

Wondering if this breaks some convention or is a big no no for some reason.

I have been able to create nested methods instide a store property e.g.

store: {
   messages: {
       list: [],
       setMessage(message) {
          this.list.push(message)
       }
   }
...
}

Can you share some insight if this is going to make the computer explode? :)

danikane commented 6 years ago

Well, I have methods in my store as well. :) Haven't had any hiccups yet.