toRaw() Get the Raw Object
Last updated: 2026-10-22
toRaw() Get the Raw Object
toRaw() returns the underlying object behind a proxy — for bypassing reactivity or handing data to external libraries.
| Group | Reactivity: Advanced |
|---|---|
| Kind | API |
| Scope | Component |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
const raw = toRaw(proxy)
raw.count = 5 // no reactivity is triggered
⚙️ Arguments
| proxy | A reactive/readonly proxy or ref |
|---|
Returns:The original unproxied object
▶ Example
Edit the code below and see the live result:
Output:
Shows 'same as original: true'.
💡 Key Points
ℹ️ Note Typical uses: feeding chart/map libraries and identity comparisons.
⚠️ Warning Mutating the raw object skips updates — silent changes desync the view.
🏷️ Related Advanced
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q Why do third-party libraries need it?
A Some libraries rely on identity or internals that proxies disturb.
Q What does it return for a ref?
A The raw inner value (or its original object).
Q Can it replace markRaw?
A No — toRaw extracts; markRaw marks a value to never be proxied.