Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
Acciones vuex que no cometen mutaciones.

estoy tratando de cometer una mutación simple pero no funciona

 import { createStore } from 'vuex' import axios from 'axios'; export default createStore({ state: { user:{ } }, mutations: { change_user(state ,payload) { state.user = payload; } }, actions: { async get_data({commit}){ let result = await axios.get('http://localhost:3000/posts/'); commit('change_user',result.data); } }, modules: { } })

pero commit('change_user',result.data); parece que no funciona

respuesta: {balance: 32323, withdrawls: 23, earned_today: 3223, refers: 2323}

¿Hay algo mal en mi código?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!