Skip to content

Raw API medium #Reactivity:Advanced

By webfansplz @webfansplz

Take the Challenge    简体中文

For this challenge, you'll use Reactivity API: [xx]Raw to complete the challenge. Here's what you need to implement 👇:

<script setup lang="ts">
import { reactive, isReactive } from "vue"

const state = { count: 1 }
const reactiveState = reactive(state)

/**
 * Modify the code so that we can make the output be true.
*/
console.log(reactiveState === state)

/**
 * Modify the code so that we can make the output be false.
*/
const info = { count: 1 }
const reactiveInfo = reactive(info)

console.log(isReactive(reactiveInfo))

</script>

<template>
  <div>
    <p>
      {{ reactiveState.count }}
    </p>
  </div>
</template>


Share your Solutions Check out Solutions