Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

use $axios in vuex in nuxt

async nuxtServerInit ({ commit }, { $axios }) {
  const ip = await $axios.$get('http://icanhazip.com')
  commit('SET_IP', ip)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vuex #nuxt
ADD COMMENT
Topic
Name
9+4 =