All Projects → dotneet → nuxtend

dotneet / nuxtend

Licence: other
This library extends the Nuxt.js features.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nuxtend

Nuxt Netlify Cms Starter Template
⚡ Build server-less, static websites with Vue.js and Netlify CMS.
Stars: ✭ 186 (+564.29%)
Mutual labels:  nuxtjs
Mordred
[Experimental] Source data from anywhere, for Next.js, Nuxt.js, Eleventy and many more.
Stars: ✭ 208 (+642.86%)
Mutual labels:  nuxtjs
Vuetimeline
🕵️‍♀️🕵️‍♂️ One easy-to-use component for Vue.js to build beautiful responsive timelines.
Stars: ✭ 242 (+764.29%)
Mutual labels:  nuxtjs
Svg Sprite Module
Optimize SVG files and combine them into sprite
Stars: ✭ 187 (+567.86%)
Mutual labels:  nuxtjs
Router Extras Module
Extra Add-ons For Nuxt Router
Stars: ✭ 194 (+592.86%)
Mutual labels:  nuxtjs
Nuxt Shopify
🛍 Seamless Shopify Buy SDK integration with Nuxt.js.
Stars: ✭ 210 (+650%)
Mutual labels:  nuxtjs
Python Module
Write Nuxt.js applications using Python! [Experimental]
Stars: ✭ 181 (+546.43%)
Mutual labels:  nuxtjs
dynamic
Load components initialized through @nuxt/components dyamically.
Stars: ✭ 49 (+75%)
Mutual labels:  nuxtjs
Nuxt Netlify Cms Module
Easy Netlify CMS integration with nuxt.js
Stars: ✭ 195 (+596.43%)
Mutual labels:  nuxtjs
Redirect Module
No more cumbersome redirects!
Stars: ✭ 235 (+739.29%)
Mutual labels:  nuxtjs
Bael Template
Brutalist Blog theme for Netlify CMS
Stars: ✭ 187 (+567.86%)
Mutual labels:  nuxtjs
Typed Vuex
🏦 A typed store accessor for vanilla Vuex.
Stars: ✭ 193 (+589.29%)
Mutual labels:  nuxtjs
Framework
0xcert Framework - JavaScript framework for building decentralized applications - build something unique
Stars: ✭ 213 (+660.71%)
Mutual labels:  nuxtjs
Bootstrap Vue
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
Stars: ✭ 13,603 (+48482.14%)
Mutual labels:  nuxtjs
Moviepark
A Nuxt universal app with an Adonis 5 api server using the TMDb API for its movie catalog.
Stars: ✭ 32 (+14.29%)
Mutual labels:  nuxtjs
Feed Module
Everyone deserves RSS, ATOM and JSON feeds!
Stars: ✭ 182 (+550%)
Mutual labels:  nuxtjs
Whitebird
Open-Source, collaborative, digital Whiteboard
Stars: ✭ 209 (+646.43%)
Mutual labels:  nuxtjs
rust-loottables
List of loot tables for various crates, boxes, barrels, piles for game Rust.
Stars: ✭ 1 (-96.43%)
Mutual labels:  nuxtjs
ShareManBox-Nuxt
ShareMan's personal website of version3.
Stars: ✭ 104 (+271.43%)
Mutual labels:  nuxtjs
Vuemmerce
👉 Responsive ecommerce template 🛒 built with Vue.js and Nuxt.js
Stars: ✭ 223 (+696.43%)
Mutual labels:  nuxtjs

This library makes Nuxt.js possible to use mixin for asyncData()/fetch() and provide some helpful features.

Install

npm i nuxtend

Mixin

import nuxtend from 'nuxtend'

const m = {
  async asyncData (context) {
    // works!
    return {commonData: 'data'}
  }
}

export default nuxtend({
  mixins: [m],
  async asyncData (context) {
    return {}
  }
})

methods can be used on asyncData/fetch via this.

This feature enables you to call a vuex action in same syntax anywhere. Of course you can call non vuex action methods also.

import nuxtend from 'nuxtend'
import {mapActions} from 'vuex'

const mixinA = {
  methods: {
    ...mapActions({'findBooks': 'books/find'})
  }
}

export default nuxtend({
  mixins: [mixinA],
  async asyncData (context) {
    const books = await this.findBooks()
    const audios = await this.findAudios()
    return {
      books,
      audios
    }
  },
  mounted () {
    this.findBooks()
  },
  methods: {
    ...mapActions({
      'findAudios': 'audios/find'
    })
  }
})

Abstraction of calling api and actions. (since 0.2.0)

export default nuxnted({
  nuxtend: {
    actions: ['apple', 'me/banana']
  },
  async asyncData () {
    // if 'apples/get' action is defined call it, if not call $axios.get('/apples/10')
    const res = await this.getApple(10)
    // and also below functions can be used as well.
    // - action: 'apples/getList'  api: this.$axios.get('/apples', {params: {status: 'dropped'}})
    // this.getAppleList({status: 'dropped'})
    // - action: 'apples/create'  api: this.$axios.post('/apples', {status: 'dropped'})
    // this.postApple({status: 'dropped'})
    // - action: 'apples/update'  api: this.$axios.put('/apples/10', {status: 'dropped'})
    // this.putApple({id: 10, params: {status: 'dropped'}})
    // - action: 'apples/delete'  api: this.$axios.delete('/apples/10')
    // this.deleteApple(10)

    // - action: 'me/bananas/get' api: this.$axios.get('/me/bananas/10')
    // this.getBanaa(1)

    return {
      apple: res.data
    }
  }
})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].