Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

125
Visualizações
Vue3 - Reactivity not working as expected

There something about Vue3 reactivity that I am not understanding...

<template>
  <Pagination v-model="params" />
</template>

import { defineComponent, reactive, computed } from 'vue'
import { useStore } from 'vuex'

export default defineComponent({
  name: 'Jobs'
  setup(){
    const store = useStore()
    const jobsParams = computed(() => store.getters['Jobs/getParams'])
    const params = reactive(jobsParams) // Should be reactive?

    return { params }
  }
})

I want to get jobs from the store and then 'copy' it to a reactive object called params that I can then manipulate based on a child component.

The error that I am getting when updating the value of params is:

Write operation failed: computed value is readonly

Why would I be getting this error when I am not manipulating those values?

If that is not the way to do this, how can I correctly pass a object to Pagination and update the values accordingly?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda