Skip to content

render function[h()] medium #Components

By 木荣 @murongg

Take the Challenge    简体中文

For this challenge, you need use h render function to implement a component.

Note: You should make sure that the props are passed correctly, event is triggered correctly and the slot content is rendered correctly. Lets go.

<script setup lang="ts">
import MyButton from "./MyButton.ts"
const onClick = () => {
  console.log('onClick')
}
</script>

<template>
  <MyButton :disabled="false" @custom-click="onClick">
    my button
  </MyButton>
</template>

Share your Solutions Check out Solutions