By building components, you can extend basic HTML elements and reuse encapsulated code. Most options that are passed into a Vue constructor can be passed into a component. Each instance of a component has an isolated scope. Data can only be passed one direction and it must be from parent to child using
props. To communicate with the parent element, use the
Code preview is referencing
Christopher! Thanks, I was really confused.
the initializer value for total doesnt seems right p/s: its about the vue version...fixed
Hi Greg, thanks for the great corse. I found it confusing that you don't mention that “X-Templates” script is a part of a component definition. In this case the component definition seems split in two parts. Whithout that, it’s like “where is this script stuff coming from?”