You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: content/0.index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ Nuxt is a free and [open-source framework](https://github.com/nuxt/nuxt) with an
19
19
20
20
## Getting Started
21
21
22
-
With this tutorial, we assume you are already familiar with the basic concept of HTML, CSS, JavaScript. Nuxt is a full-stack framework built on top of [Vue](https://vuejs.org), we also include a simple Vue tutorial to help you get started quickly.
22
+
With this tutorial, we assume you are already familiar with the basic concepts of HTML, CSS and JavaScript. Nuxt is a full-stack framework built on top of [Vue](https://vuejs.org), we also include a simple Vue tutorial to help you get started quickly.
23
23
24
-
Start learning by click the topics below:
24
+
Start learning by clicking the topics below:
25
25
26
26
::div{.flex.flex-wrap.gap-2}
27
27
:content-card{to="/vue"title="Vue Basics"description="If you are not familiar with Vue, we recommend you to learn the basics of Vue first."icon="i-logos-vue"}
@@ -30,7 +30,7 @@ Start learning by click the topics below:
30
30
31
31
## Case Studies
32
32
33
-
Once you are already familiar the concepts of Vue and Nuxt, we provided some case studies to help you understand how to use Nuxt in real-world applications:
33
+
Once you are already familiar with the concepts of Vue and Nuxt, we provide some case studies to help you understand how to use Nuxt in real-world applications:
34
34
35
35
::div{.flex.flex-wrap.gap-2}
36
36
:content-card{to="/"wiptitle="GitHub Profile"description="Build an website to generate custom user profile from GitHub"icon="i-ph-user-circle-duotone"}
Copy file name to clipboardExpand all lines: content/1.vue/1.index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ Nuxt integrates [Vue 3](https://vuejs.org/), a progressive framework for buildin
8
8
9
9
What you see in the editor is a [Vue Single-File Component](https://vuejs.org/guide/scaling-up/sfc.html)(SFC).
10
10
11
-
An SFC is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written inside a .vue file. It's composed with a [`<script setup>`](https://vuejs.org/api/sfc-script-setup.html)) block to define the JavaScript logic, a `<template>` block to define the HTML template and optional `<style>` blocks to define the CSS style. You can play with it using it the playground on the right, or read more about it in the [official Vue documentation](https://v3.vuejs.org/guide/single-file-component.html).
11
+
An SFC is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written inside a `.vue` file. It's composed with a [`<script setup>`](https://vuejs.org/api/sfc-script-setup.html) block to define the JavaScript logic, a `<template>` block to define the HTML template and optional `<style>` blocks to define the CSS style. You can play with it using the playground on the right, or read more about it in the [official Vue documentation](https://v3.vuejs.org/guide/single-file-component.html).
12
12
13
-
In Nuxt, we supports Vue SFC out-of-box and highly recommend you to use it to build your application. One thing that is different from Vue's default Vue SFC is that in Nuxt we [auto-imports the Vue utilities](https://nuxt.com/docs/guide/concepts/auto-imports) for you, so you can use `ref`, `computed` and other Vue APIs directly without importing them.
13
+
In Nuxt, we support Vue SFC out-of-the-box and highly recommend you to use it to build your application. One thing that is different from Vue's default Vue SFC is that in Nuxt we [auto-import the Vue utilities](https://nuxt.com/docs/guide/concepts/auto-imports) for you, so you can use `ref`, `computed` and other Vue APIs directly without importing them.
14
14
15
15
::note
16
-
**Tips**: You might heard that there are a few different ways to define a Vue component. In general, we recommend using [`<script setup>`](https://vuejs.org/api/sfc-script-setup.html) with [Composition API](https://vuejs.org/guide/introduction.html#composition-api) to get the best developer experience. If you are new to Vue, don't worry too much about understanding all different choices, you can follow what we recommend as we believe it's also the most intuitive way to get started with Vue.
16
+
**Tips**: You might have heard that there are a few different ways to define a Vue component. In general, we recommend using [`<script setup>`](https://vuejs.org/api/sfc-script-setup.html) with [Composition API](https://vuejs.org/guide/introduction.html#composition-api) to get the best developer experience. If you are new to Vue, don't worry too much about understanding all different choices, you can follow what we recommend as we believe it's also the most intuitive way to get started with Vue.
17
17
::
18
18
19
19
Going forward, we will cover the following topics:
Copy file name to clipboardExpand all lines: content/1.vue/2.reactivity/index.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,27 @@ ogImage: true
4
4
5
5
# Reactivity Part 1
6
6
7
-
Vue provides [a great reactivity system](https://vuejs.org/guide/essentials/reactivity-fundamentals.html) that tracks changes to the data and triggers updates automatically, allowing you have your UI always up-to-date with the data. Vue's reactivity comes with a few primitives: `ref`, `reactive`, `computed` and `watch`.
7
+
Vue provides [a great reactivity system](https://vuejs.org/guide/essentials/reactivity-fundamentals.html) that tracks changes to the data and triggers updates automatically, allowing you to have your UI always up-to-date with the data. Vue's reactivity comes with a few primitives: `ref`, `reactive`, `computed` and `watch`.
8
8
9
-
-[`ref()`](https://vuejs.org/api/reactivity-core.html#ref) creates a container to hold a single value, that can be tracked automatically when the value changes. Value can be accessed or updated via `.value` property.
9
+
-[`ref()`](https://vuejs.org/api/reactivity-core.html#ref) creates a container to hold a single value, that can be tracked automatically when the value changes. The value can be accessed or updated via `.value` property.
10
10
11
11
-[`computed()`](https://vuejs.org/api/reactivity-core.html#computed) takes a getter function and returns a `ref` object, that reflects the return value of the getter function.
12
12
13
-
Here in the playground, we created a ref object `count` to hold a number, a computed object `double` that calculates the double of `count`. Vue will smartly know that `double` depends on `count`, so whenever `count` changes, `double` will re-calculate automatically.
13
+
Here in the playground, we've created a ref object named `count` to hold a number, and a computed object named`double` that calculates the double of `count`. Vue will smartly know that `double` depends on `count`, so whenever `count` changes, `double` will re-calculate automatically.
14
14
15
-
Try click the button to increase the `count` value - you will see the value of `double` also reflects the change.
15
+
Try clicking the button to increase the `count` value - you will see that the value of `double` also reflects the change.
16
16
17
17
::note
18
-
**Note**: Refs will be [auto unwrapped by Vue](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#declaring-reactive-state-1) when referenced in the `<template>`, `.value` is only needed when accessing the ref in `<script>` or JavaScript outside of Vue components.
18
+
**Note**: Refs will be [auto unwrapped by Vue](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#declaring-reactive-state-1) when referenced in the `<template>`, The `.value` is only needed when accessing the ref in `<script>` or JavaScript outside of Vue components.
19
19
::
20
20
21
21
## Challenge
22
22
23
-
Now let's get our hands on it! Try to modify the code, make the multiplier also reactively updatable (current hard-coded as `2`).
23
+
Now let's get our hands on it! Try modifying the code to make the multiplier also reactively updatable (current hard-coded as `2`).
24
24
25
25
To do that, you can:
26
26
27
-
1. Create a variable `multiplier` with `ref()` and set it to `2`
27
+
1. Create a variable named `multiplier` with `ref()` and set it to `2`
28
28
2. Rename `double` to `result` in both the `<script>` and `<template>`
29
29
3. Update the implementation of `result` to return `count.value * multiplier.value`{lang=js}
30
30
4. Add another button to increase the `multiplier` value
@@ -35,4 +35,4 @@ If you get stuck, you can check the solution by clicking the button below, or on
Great! You've learned the basics of Vue. If you are interested in learnmore more about Vue, check out the [official Vue documentation](https://vuejs.org/) for more in-depth guides and tutorials.
3
+
Great! You've learned the basics of Vue. If you are interested in learning more about Vue, check out the [official Vue documentation](https://vuejs.org/) for more in-depth guides and tutorials.
4
4
5
5
Up next, let's start to explore how Nuxt would make your development experience even better.
Copy file name to clipboardExpand all lines: content/2.concepts/1.index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Nuxt is a free and open-source framework with an intuitive and extendable way to
10
10
11
11
## Automation and Conventions
12
12
13
-
Nuxt uses conventions and an opinionated directory structure to automate repetitive tasks and allow developers to focus on pushing features. The configuration file can still customize and override its default behaviors.
13
+
Nuxt uses conventions and an opinionated directory structure to automate repetitive tasks and allow developers to focus on pushing features. The configuration file can still be customized and override its default behaviors.
14
14
15
15
-[**File-based routing**](/concepts/routing): define routes based on the structure of your [`pages/` directory](/docs/guide/directory-structure/pages). This can make it easier to organize your application and avoid the need for manual route configuration.
16
16
-[**Auto-imports**](/concepts/auto-imports): write Vue composables and components in their respective directories and use them without having to import them with the benefits of tree-shaking and optimized JS bundles.
@@ -24,6 +24,6 @@ Nuxt takes care of these and provides both frontend and backend functionality so
24
24
25
25
## Getting Started
26
26
27
-
This playground has Nuxt installed and configured for you, so we could directly start with the creation of our application. If you want to install Nuxt locally on yourself, please follow the [installation guide](https://nuxt.com/docs/getting-started/installation).
27
+
This playground has Nuxt installed and configured for you, so we can directly start with the creation of our application. If you want to install Nuxt locally on your own machine, please follow the [installation guide](https://nuxt.com/docs/getting-started/installation).
28
28
29
29
To get started, let's learn about how your [Nuxt application entry is defined](/concepts/app-vue).
0 commit comments