Skip to content
On this page

exportRender

Stability: experimental ⚠️ Experimental feature, use at your risk

Transform the default export statement, in <script setup> of Vue SFC, as a component render function.

FeaturesSupported
Vue 3
Nuxt 3
Vue 2
Volar Plugin

TIP

This feature depends on defineRender, and make sure defineRender is not disabled.

Usage

vue
<script setup lang="tsx">
// JSX passed directly
export default <div>ok</div>

// Or using render function
export default () => <div>ok</div>
</script>