docs: remove example of deprecated reactivity transform (#21396)

This commit is contained in:
Žan Fras 2023-06-09 23:24:39 +02:00 committed by GitHub
parent ee6869b1ba
commit 0505c9147d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 77 deletions

View File

@ -1,13 +0,0 @@
---
toc: false
---
# Reactivity Transform
This example demonstrates the support of Reactivity Transform in Nuxt 3.
::ReadMore{link="https://vuejs.org/guide/extras/reactivity-transform.html" title="Reactivity Transform"}
::
::sandbox{repo="nuxt/nuxt" branch="main" dir="examples/experimental/reactivity-transform" file="app.vue"}
::

View File

@ -1,26 +0,0 @@
<script setup lang="ts">
let count = $ref(0)
function inc () {
count++
}
function dec () {
count--
}
</script>
<template>
<NuxtExampleLayout example="experimental/reactivity-transform">
<div>
<Label :count="count" />
<div class="flex gap-1 justify-center">
<NButton @click="inc()">
Inc
</NButton>
<NButton @click="dec()">
Dec
</NButton>
</div>
</div>
</NuxtExampleLayout>
</template>

View File

@ -1,13 +0,0 @@
<script setup lang="ts">
const props = defineProps<{
count: number,
}>()
const doubled = $computed(() => props.count * 2)
</script>
<template>
<div class="pb2">
Count <b>{{ count }}</b><br>
Doubled <b>{{ doubled }}</b>
</div>
</template>

View File

@ -1,9 +0,0 @@
export default defineNuxtConfig({
modules: [
'@nuxt/ui'
],
experimental: {
reactivityTransform: true
}
// builder: 'webpack'
})

View File

@ -1,13 +0,0 @@
{
"name": "example-reactivity-transform",
"private": true,
"scripts": {
"build": "nuxi build",
"dev": "nuxi dev",
"start": "nuxi preview"
},
"devDependencies": {
"@nuxt/ui": "^0.3.3",
"nuxt": "^3.0.0"
}
}

View File

@ -1,3 +0,0 @@
{
"extends": "./.nuxt/tsconfig.json"
}

View File

@ -12,6 +12,10 @@ export default defineUntypedSchema({
/**
* Enable Vue's reactivity transform
* @see https://vuejs.org/guide/extras/reactivity-transform.html
*
* Warning: Reactivity transform feature has been marked as deprecated in Vue 3.3 and is planned to be
* removed from core in Vue 3.4.
* @see https://github.com/vuejs/rfcs/discussions/369#discussioncomment-5059028
*/
reactivityTransform: false,