Skip to content
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

docs: update docs with vue school lessons/courses #2962

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions src/guide/components/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ if (typeof window !== 'undefined') {
<VueSchoolLink href="https://vueschool.io/lessons/defining-custom-events-emits" title="Free Vue.js Lesson on Defining Custom Events"/>
</div>

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/communication-between-vue-components-with-custom-events" title="Free Vue.js Lesson on Defining Custom Events"/>
</div>

## Emitting and Listening to Events {#emitting-and-listening-to-events}

A component can emit custom events directly in template expressions (e.g. in a `v-on` handler) using the built-in `$emit` method:
Expand Down
4 changes: 4 additions & 0 deletions src/guide/components/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<VueSchoolLink href="https://vueschool.io/lessons/vue-3-reusable-components-with-props" title="Free Vue.js Props Lesson"/>
</div>

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/reusable-components-with-props-2" title="Free Vue.js Props Lesson"/>
</div>

## Props Declaration {#props-declaration}

Vue components require explicit props declaration so that Vue knows what external props passed to the component should be treated as fallthrough attributes (which will be discussed in [its dedicated section](/guide/components/attrs)).
Expand Down
4 changes: 4 additions & 0 deletions src/guide/components/provide-inject.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/using-provide-inject-with-the-composition-api" title="Free Vue.js Provide and Inject Lesson"/>
</div>

## Prop Drilling {#prop-drilling}

Usually, when we need to pass data from the parent to a child component, we use [props](/guide/components/props). However, imagine the case where we have a large component tree, and a deeply nested component needs something from a distant ancestor component. With only props, we would have to pass the same prop across the entire parent chain:
Expand Down
8 changes: 8 additions & 0 deletions src/guide/essentials/watchers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Watchers {#watchers}

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/using-watch-with-the-composition-api" title="Free Vue.js Watch Lesson"/>
</div>

## Basic Example {#basic-example}

Computed properties allow us to declaratively compute derived values. However, there are cases where we need to perform "side effects" in reaction to state changes - for example, mutating the DOM, or changing another piece of state based on the result of an async operation.
Expand Down Expand Up @@ -311,6 +315,10 @@ watch(

## `watchEffect()` \*\* {#watcheffect}

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/the-composition-api-watcheffect-function" title="Free Vue.js watchEffect Lesson"/>
</div>

It is common for the watcher callback to use exactly the same reactive state as the source. For example, consider the following code, which uses a watcher to load a remote resource whenever the `todoId` ref changes:

```js
Expand Down
8 changes: 8 additions & 0 deletions src/guide/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ import { VTCodeGroup, VTCodeGroupTab } from '@vue/theme'

## Creating a Vue Application {#creating-a-vue-application}

<div class="options-api">
<VueSchoolLink href="https://vueschool.io/lessons/vue-fundamentals-capi-local-setup-with-vite" title="Free Vue.js and Vite Setup Lesson"/>
</div>

<div class="composition-api">
<VueSchoolLink href="https://vueschool.io/lessons/vue-fundamentals-capi-local-setup-with-vite" title="Free Vue.js and Vite Setup Lesson"/>
</div>

:::tip Prerequisites

- Familiarity with the command line
Expand Down
2 changes: 1 addition & 1 deletion src/guide/scaling-up/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Both online playgrounds mentioned above also support downloading files as a Vite

For information on migrating from Vue CLI to Vite:

- [Vue CLI -> Vite Migration Guide from VueSchool.io](https://vueschool.io/articles/vuejs-tutorials/how-to-migrate-from-vue-cli-to-vite/)
- [Vue CLI -> Vite Migration Guide from VueSchool.io](https://vueschool.io/articles/vuejs-tutorials/how-to-migrate-from-vue-cli-to-vite/?friend=vuejs)
- [Tools / Plugins that help with auto migration](https://github.com/vitejs/awesome-vite#vue-cli)

### Note on In-Browser Template Compilation {#note-on-in-browser-template-compilation}
Expand Down