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

Issue in Nuxt.js #126

@0xuhe

Description

@0xuhe

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions