{{title}}">
I'm creating a reusable tab component by watching a tutorial. After watching it, I understood how it works. However, for my project I need to create tabs with a title that can be changed since this is a reusable component so I have to change the title for each new tab but I haven't figured it out yet Find out how. I need to somehow get the title from the TabsWrapper component I added to the page
{{title}}
Then let this header change the text inside this div, which is the main header of the TabsWrapper component.
{{title}}
My code: The first is the out-of-component code I added to the homepage of the website.
Hello 1 Hello 2 Hello 3 Hello 4
The second one is the code inside the component responsible for TabsWrapper
- {{ title }}
This code gets each title from the Tab
Hello 1
This code renders it
I tried repeating the same technique and it worked, but I think there is a better way
{{headtitle}} - {{ title }}
You can simply pass the props in the script tag and access them directly using this keyword and the prop name.
In a template tag like this
{{ foo }}
You don't need to use ref you can just use v-for directly and loop over the array elements.