How to use feathers-vuex - 3 common examples

To help you get started, we’ve selected a few feathers-vuex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nothingismagick / quasar-starter-ssr-pwa-jest-cypress / src / store / index.js View on Github external
import Vue from 'vue'
import Vuex from 'vuex'
import feathersVuex from 'feathers-vuex'
import feathers from '../api/feathers' // Cannot load this as a plugin :-(

import example from './module-example'

const { service, auth } = feathersVuex(feathers, {
  idField: 'id', // The field in each record that will contain the id
  autoRemove: false, // automatically remove records missing from responses (only use with feathers-rest)
  nameStyle: 'short', // Determines the source of the module name. 'short' or 'path'
  enableEvents: true // Set to false to explicitly disable socket event handlers.
})

Vue.use(Vuex)

/*
 * If not building with SSR mode, you can
 * directly export the Store instantiation
 */

export default function (/* { ssrContext } */) {
  const Store = new Vuex.Store({
    modules: {
github quasarframework / app-extension-feathersjs / src / templates / base / src / store / index.js View on Github external
import Vue from 'vue'
import Vuex from 'vuex'
import feathersVuex from 'feathers-vuex'
import feathers from '../api/feathers' // Cannot load this as a plugin :-(

const { service, auth } = feathersVuex(feathers, {
  idField: 'id', // The field in each record that will contain the id
  autoRemove: false, // automatically remove records missing from responses (only use with feathers-rest)
  nameStyle: 'short', // Determines the source of the module name. 'short' or 'path'
  enableEvents: true // Set to false to explicitly disable socket event handlers.
})

Vue.use(Vuex)

/*
 * If not building with SSR mode, you can
 * directly export the Store instantiation
 */

export default function (/* { ssrContext } */) {
  const Store = new Vuex.Store({
    modules: {
github silvestreh / feathers-nuxt / client / store / index.js View on Github external
import feathersClient from '../feathers-client';
import feathersVuex, { initAuth } from 'feathers-vuex';

const { service, auth } = feathersVuex(feathersClient, { idField: '_id' });

export const state = () => ({});
export const mutations = {};

export const actions = {
  nuxtServerInit({ commit, dispatch }, { req }) {
    return initAuth({
      commit,
      dispatch,
      req,
      moduleName: 'auth',
      cookieName: 'feathers-jwt'
    })
  }
};

feathers-vuex

FeathersJS, Vue, and Nuxt for the artisan developer

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular feathers-vuex functions