class Soda {
  constructor (vm, options = {}) {
    this.mutations = options.mutations
    this.state = options.state
    this._inject = false

    const init = root => {
      const map = (_vm) => {
        if (!vm.$children.length) return
        _vm.$children.forEach(child => {
          inject(child)
          map(child)
        })
      }
      const inject = (_vm) => {
        _vm.$soda = this
        _vm.soda = this.state
      }
      root.soda = this.state
      map(root)
    }
    init(vm)
    return this
  }

  commit (type, payload) {
    this.mutations[type](this.state, payload)
  }
}

export default Soda

@@ -135,16 +135,232 @@
  = false
+%0A    this.root = vm%0A%0A    // const %7B commit %7D = this%0A%0A    // const store = this%0A%0A    // this.commit = function boundCommit (type, payload, options) %7B%0A    //   return commit.call(store, type, payload, options)%0A    // %7D
 %0A%0A    co
@@ -422,16 +422,17 @@
    if (!
+_
 vm.$chil
@@ -580,32 +580,84 @@
 ct = (_vm) =%3E %7B%0A
+        if (typeof _vm.soda === 'undefined') return%0A
         _vm.$sod
@@ -839,17 +839,28 @@
 ns%5Btype%5D
-(
+.call(this, 
 this.sta

improve soad add root