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

217
Views
How to get original object from Vue 3 proxy?

I want to get original object that was passed to reactive() from Vue 3 proxy. This is my code:

const token: any = reactive(new Token());
console.log(token.target);//prints undefined

Could anyone say how to do it?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

reactive returns JavaScript Proxy which doesn't expose original object, unless a proxy is revokable.

Original object can be accessed through __v_raw property on reactive proxy, it's not a part of public API and shouldn't be relied on. Public API is toRaw:

const token = reactive(rawToken);
const rawToken = toRaw(token);

If original object is needed then the reference shouldn't be discarded:

const rawToken = new Token();
const token = reactive(rawToken);
about 4 years ago · Juan Pablo Isaza Report
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!