Skip to content
A tiny and unholy Vuex extension for Nuxt.js
Branch: master
Clone or download
Latest commit b6478cd Mar 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src bump + fix Mar 30, 2019
.gitignore rewrite store template Mar 30, 2019
README.md update readme Mar 30, 2019
package.json bump + fix Mar 30, 2019

README.md

unholy is a Vuex extension for Nuxt.js that modifies commit() to allow simple, recursive state merging, as long as you use a single global state in your application.

this.$store.commit({
  propInState: {
    toBeUpdated: 2
  }
})

Calls to commit() with a single object parameter will trigger this functionality.

Calls with more arguments will trigger the original functionality.

It is unsafe because it extends Vuex.Store's prototype and Nuxt.js's default store.js template.

In other words, at the time of writing, this module is only guaranteed to work with Nuxt 2.5.1 and Vuex 3.1.0.

See what nuxt/hackernews looks like with unholy.

Installation

yarn add unholy

Setup

Add to the modules section of your nuxt.config.js:

export default {
  modules: ['unholy']
}

Credits

You can’t perform that action at this time.