Skip to content

defineRender

Stability: stable

Defining render function in <script setup> using the defineRender.

FeaturesSupported
Vue 3
Nuxt 3
Vue 2
TypeScript

We need more feedback on RFC Discussion!

Basic Usage

vue
<script setup lang="tsx">
// JSX passed directly
defineRender
(
<
div
>
<
span
>Hello</
span
>
</
div
>,
) // Or using render function
defineRender
(() => {
return ( <
div
>
<
h1
>Hello World</
h1
>
</
div
>
) }) </script>

Contributors

The avatar of contributor named as renovate[bot] renovate[bot]
The avatar of contributor named as zhiyuanzmj zhiyuanzmj
The avatar of contributor named as Kevin Deng Kevin Deng
The avatar of contributor named as gaokefei gaokefei

Changelog