Skip to content

Vueschool links #2379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/v2/guide/components-custom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ order: 103

> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components.

<div class="vueschool"><a href="https://vueschool.io/lessons/communication-between-components?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to work with custom events on Vue School">Learn how to work with custom events in a free Vue School lesson</a></div>

## Event Names

Unlike components and props, event names don't provide any automatic case transformation. Instead, the name of an emitted event must exactly match the name used to listen to that event. For example, if emitting a camelCased event name:
Expand Down
2 changes: 2 additions & 0 deletions src/v2/guide/components-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ order: 102

> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components.

<div class="vueschool"><a href="https://vueschool.io/lessons/reusable-components-with-props?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how component props work with Vue School">Learn how component props work with a free lesson on Vue School</a></div>

## Prop Casing (camelCase vs kebab-case)

HTML attribute names are case-insensitive, so browsers will interpret any uppercase characters as lowercase. That means when you're using in-DOM templates, camelCased prop names need to use their kebab-cased (hyphen-delimited) equivalents:
Expand Down
2 changes: 2 additions & 0 deletions src/v2/guide/computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ order: 5

## Computed Properties

<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-computed-properties?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how computed properties work with Vue School">Learn how computed properties work with a free lesson on Vue School</a></div>

In-template expressions are very convenient, but they are meant for simple operations. Putting too much logic in your templates can make them bloated and hard to maintain. For example:

``` html
Expand Down
2 changes: 2 additions & 0 deletions src/v2/guide/conditional.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ type: guide
order: 7
---

<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-conditionals?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how conditional rendering works with Vue School">Learn how conditional rendering works with a free lesson on Vue School</a></div>

## `v-if`

The directive `v-if` is used to conditionally render a block. The block will only be rendered if the directive's expression returns a truthy value.
Expand Down
2 changes: 2 additions & 0 deletions src/v2/guide/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ type: guide
order: 9
---

<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-user-events?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to handle events on Vue School">Learn how to handle events in a free Vue School lesson</a></div>

## Listening to Events

We can use the `v-on` directive to listen to DOM events and run some JavaScript when they're triggered.
Expand Down
3 changes: 3 additions & 0 deletions src/v2/guide/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ type: guide
order: 8
---

<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-loops?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to render lists on Vue School">Learn how to render list with a free Vue School lesson</a></div>


## Mapping an Array to Elements with `v-for`

We can use the `v-for` directive to render a list of items based on an array. The `v-for` directive requires a special syntax in the form of `item in items`, where `items` is the source data array and `item` is an **alias** for the array element being iterated on:
Expand Down