markRaw — prevent reactivity. toRaw — get original object.
markRaw:
toRaw:
1<script setup>2import { reactive, markRaw, toRaw } from "vue"34const obj = markRaw({ nested: {} })5const state = reactive({ obj })6// state.obj is NOT reactive78const raw = toRaw(state)9// raw is the original object10</script>
Key: markRaw for performance, toRaw for access.