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

68
Views
Vue 3 change reactive object

I have some struggles changing reactive object in Vue 3. For now my app works like that:

 let selected = ref({
            label: items[0].label,
            icon: items[0].icon,
            class: items[0].class,
            component: items[0].component
        });

as you see I'm not using reactive here, reactive should look like: let selected = reactive(items[0]);

and when I'm changing ref, it works like that:

function select(value : any) { //Record<string, any> ) {
      selected.value = value;

      emit('update:modelValue', value);
    }

And that works as expected, but when I change to reactive object, I'm removing value from function select, and it's not changing the object. How to fix that?

btw: I'm using TypeScript

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!