markRaw() Mark an Object to Never Be Proxied
Last updated: 2026-10-22
markRaw() Mark an Object to Never Be Proxied
markRaw() marks an object so it is never proxied even inside reactive structures — for third-party instances or large static data.
| Group | Reactivity: Advanced |
|---|---|
| Kind | API |
| Scope | Component |
| Vue Version | 3.0+ |
| SSR Support | Yes |
📝 Syntax
const chart = markRaw(new Chart(el, opts))
const state = reactive({ chart }) // chart stays unproxied
⚙️ Arguments
| value | An object (flagged internally) |
|---|
Returns:The same object
▶ Example
Edit the code below and see the live result:
Output:
Shows 'proxied? false' — the mark works.
💡 Key Points
💡 Tip Mark third-party instances (charts, editors, maps) before putting them into reactive state.
⚠️ Warning The mark is permanent and disables reactivity for that object.
ℹ️ Note Good for large static data such as city lists.
🏷️ Related Advanced
💡 Related Cases
More case studies coming soon.
📚 Related Tutorials
❓ FAQ
Q Difference from shallowRef?
A shallowRef tracks replacement of the wrapper; markRaw exempts the object itself.
Q Will its data still update?
A No — it lives outside the reactivity system.
Q Can the mark be undone?
A No — create a separate reactive copy if needed.