Hi I'm new to vue and am trying to understand its one-way data bind model component registration and passing props.
In my index.js I have my parent component in which I want to render a single child right now
import Vue from 'vue'
import StyledTitle from './components/StyledTitle'
new Vue({
el: '#app',
components: {
StyledTitle,
},
})
Child Component is StyledTitle.js
import Vue from 'vue'
import styled from 'vue-styled-components'
const StyledTitle = styled.h1`
font-size: 1.5em;
text-align: center;
color: #ff4947;
&:hover,
&:focus {
color: #f07079;
}
`
Vue.component('styled-title', {
props: ['text'],
components: {
'styled-title': StyledTitle,
},
template: `<StyledTitle>{{ text }}</StyledTitle>`,
})
export default StyledTitle
Finally my HTML is which I expect to render a red Hi
<div id="app">
<styled-title text="Hi"></styled-title>
</div>
The HI is not showing up though and the props value is undefined. Coming to this from react so wondering why this isnt working, thanks!

textas a prop instead of just setting it in the default slot? - Phil