Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Issue in Nuxt.js #126

Open
0xuhe opened this issue Nov 28, 2021 · 0 comments
Open

Issue in Nuxt.js #126

0xuhe opened this issue Nov 28, 2021 · 0 comments

Comments

@0xuhe
Copy link

0xuhe commented Nov 28, 2021

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?

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

No branches or pull requests

1 participant