I have a handful of string props I am passing in from a parent component. Is it best practice to use & or &?
<ChildComponent
newString="Look & Talk" // or "Look & Talk" ??
>
</ChildComponent>
I have a handful of string props I am passing in from a parent component. Is it best practice to use & or &?
<ChildComponent
newString="Look & Talk" // or "Look & Talk" ??
>
</ChildComponent>
The answer should be found in ChildComponent:
newString will be rendered as a safe string? then you can go with "Look & Talk"newString will be user with v-html directive? then you should go with "Look & Talk"Aaron pointed that & is a logical operator in javascript, but this will only be a problem if you bind the value (:newString or v-bind:newString)