This repository was archived by the owner on Mar 11, 2024. It is now read-only.
Description I try to integrate dizzle into nuxt.js with following files
// plugins/drizzle.js
import Vue from "vue" ;
import drizzleVuePlugin from "@drizzle/vue-plugin" ;
import drizzleOptions from "../drizzleOptions.js" ;
export default ( app ) => {
Vue . use ( drizzleVuePlugin , { store : app . store , drizzleOptions } ) ;
} ;
// nuxt.config.js
export default {
...
plugins : [ { src : "~/plugins/drizzle.js" , mode : "client" } ] ,
...
}
// drizzleOptions.js
import SimpleStorage from "./contracts/SimpleStorage.json" ;
const options = {
web3 : {
block : false ,
fallback : {
type : "ws" ,
url : "ws://127.0.0.1:7545" ,
} ,
} ,
contracts : [ SimpleStorage ] ,
events : {
} ,
polls : {
// check accounts ever 15 seconds
accounts : 15000 ,
} ,
} ;
export default options ;
// store/index.js
export const state = ( ) => ( { } ) ;
export const mutations = { } ;
export const actions = { } ;
export const getters = { } ;
Unfortunatly, I got the error as:
[vuex] do not mutate vuex store state outside mutation handlers.
Any help?
Reactions are currently unavailable
I try to integrate dizzle into nuxt.js with following files
Unfortunatly, I got the error as:
[vuex] do not mutate vuex store state outside mutation handlers.
Any help?