Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 2.58 KB

README.md

File metadata and controls

40 lines (28 loc) · 2.58 KB

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>


Back Share your Solutions Check out Solutions