Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
Vue js my data lost after reloading my page

I have a page reload problem.
When I save on Vscode it works correctly on my html page, but when I refresh the page my data is undefined.
The data in the store works well, however it's just on the view profile that it doesn't work only after reloading my page.
If you have any suggestions, I'm a taker, I don't know what to do anymore.

views/Profil:

<div class="input-group mb-3">
            <span class="input-group-text" id="form-lastName">Nom :</span>
            <input
              type="text"
              class="form-control"
              aria-label="Username"
              v-model="lastName"
              ref="string"
            />
          </div>
          <div class="input-group mb-3">
            <span class="input-group-text" id="form-firstName">Prénom :</span>
            <input
              type="text"
              class="form-control"
              aria-label="Username"
              v-model="firstName"
              ref="string"
            />
          </div>


----------


export default {
  name: "ProfilC",
  data: function () {
    return {
      lastName: "",
      firstName: "",
      selectedFile: "",
    };
  },
  components: {
    NavbarC,
  },
  mounted: function () {
    this.lastName = this.$store.state.userInfos.user_lastName;
    this.firstName = this.$store.state.userInfos.user_firstName;


----------
sotre/index.js

const store = createStore({
  state: {
    status: '',
    user: user,
    userInfos: {
      nom: '',
      prenom: '',
      email: '',
      image: '',
    },
    dataArticles: [],
    dataComments: [],
    articleInfos: {
      message: '',
      image: '',
    },
    comments: [],
  },

  mutations: {
    
    userInfos: function (state, userInfos) {
      state.userInfos = userInfos;
    },
},

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I see your using vuex , did you install vuex persisted-state is saved the data on page reload

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda