Skip to content

Vueschool links #311

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

Closed
wants to merge 19 commits into from
Closed
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
1 change: 1 addition & 0 deletions src/guide/class-and-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
A common need for data binding is manipulating an element's class list and its inline styles. Since they are both attributes, we can use `v-bind` to handle them: we only need to calculate a final string with our expressions. However, meddling with string concatenation is annoying and error-prone. For this reason, Vue provides special enhancements when `v-bind` is used with `class` and `style`. In addition to strings, the expressions can also evaluate to objects or arrays.

## Binding HTML Classes
<VideoLesson href="https://vueschool.io/lessons/vuejs-dynamic-classes?friend=vuejs" title="Free Vue.js Dynamic Classes Lesson">Watch a free video lesson on Vue School</VideoLesson>

### Object Syntax

Expand Down
2 changes: 2 additions & 0 deletions src/guide/component-basics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Components Basics

<VideoLesson href="https://vueschool.io/courses/vuejs-components-fundamentals?friend=vuejs" title="Free Vue.js Components Fundamentals Course">Watch a free video course on Vue School</VideoLesson>

## Base Example

Here's an example of a Vue component:
Expand Down
2 changes: 2 additions & 0 deletions src/guide/component-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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

<VideoLesson href="https://vueschool.io/lessons/reusable-components-with-props?friend=vuejs" title="Learn how component props work with Vue School">Learn how component props work with a free lesson on Vue School</VideoLesson>

## Prop Types

So far, we've only seen props listed as an array of strings:
Expand Down
2 changes: 2 additions & 0 deletions src/guide/component-registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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

<VideoLesson href="https://vueschool.io/lessons/global-vs-local-components?friend=vuejs" title="Free Vue.js Component Registration lesson">Watch a free video lesson on Vue School</VideoLesson>

## Component Names

When registering a component, it will always be given a name. For example, in the global registration we've seen so far:
Expand Down
2 changes: 2 additions & 0 deletions src/guide/computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Computed Properties

<VideoLesson href="https://vueschool.io/lessons/vuejs-computed-properties?friend=vuejs" title="Learn how computed properties work with Vue School">Learn how computed properties work with a free lesson on Vue School</VideoLesson>

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, if we have an object with a nested array:

```js
Expand Down
2 changes: 2 additions & 0 deletions src/guide/conditional.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Conditional Rendering

<VideoLesson href="https://vueschool.io/lessons/vuejs-conditionals?friend=vuejs" title="Learn how conditional rendering works with Vue School">Learn how conditional rendering works with a free lesson on Vue School</VideoLesson>

## `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/guide/events.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Event Handling

<VideoLesson href="https://vueschool.io/lessons/vuejs-user-events?friend=vuejs" title="Learn how to handle events on Vue School">Learn how to handle events in a free Vue School lesson</VideoLesson>

## Listening to Events

We can use the `v-on` directive, which we typically shorten to the `@` symbol, to listen to DOM events and run some JavaScript when they're triggered. The usage would be `v-on:click="methodName"` or with the shortcut, `@click="methodName"`
Expand Down
2 changes: 2 additions & 0 deletions src/guide/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Vue also exposes some built-in properties via the component instance, such as `$

## Lifecycle Hooks

<VideoLesson href="https://vueschool.io/lessons/understanding-the-vuejs-lifecycle-hooks?friend=vuejs" title="Free Vue.js Lifecycle Hooks Lesson">Watch a free lesson on Vue School</VideoLesson>

Each component instance goes through a series of initialization steps when it's created - for example, it needs to set up data observation, compile the template, mount the instance to the DOM, and update the DOM when data changes. Along the way, it also runs functions called **lifecycle hooks**, giving users the opportunity to add their own code at specific stages.

For example, the [created](../api/options-lifecycle-hooks.html#created) hook can be used to run code after an instance is created:
Expand Down
2 changes: 2 additions & 0 deletions src/guide/list.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# List Rendering

<VideoLesson href="https://vueschool.io/lessons/vuejs-loops?friend=vuejs" title="Learn how to render lists on Vue School">Learn how to render list with a free Vue School lesson</VideoLesson>

## 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
2 changes: 2 additions & 0 deletions src/guide/single-file-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Introduction

<VideoLesson href="https://vueschool.io/lessons/introduction-to-single-file-components?friend=vuejs" title="Free Vue.js Single File Components lesson">Watch a free video lesson on Vue School</VideoLesson>

In many Vue projects, global components will be defined using `app.component()`, followed by `app.mount('#app')` to target a container element in the body of every page.

This can work very well for small to medium-sized projects, where JavaScript is only used to enhance certain views. In more complex projects however, or when your frontend is entirely driven by JavaScript, these disadvantages become apparent:
Expand Down