Vue3 custom div creating
hello i am a vue 3 beginner. I'm trying to create a custom div, but I couldn't understand how to do it.
<template>
<MyDiv>
<Hello></Hello>
</MyDiv>
</template>
<script>
import Hello from './tools/Hello';
export default {
name: "LayoutEmpty",
components: {
'Hello': Hello
},
}
</script>
You need to define each components first, specifically the MyDiv and Hello components. This should help.
Furthermore, it looks like you want to use a custom component inside another custom component, you would need to leverage Slot.
I mocked up a quick solution template to what you might be looking for. I hope this example will point you in the right direction.