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

Update introduction.md #2784

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update introduction.md #2784

wants to merge 1 commit into from

Conversation

HP8585
Copy link
Contributor

@HP8585 HP8585 commented Apr 4, 2024

you missed the <script> and tags which can be misleading for new coder who are gonna start learning vue but will be puzzled.. please make it right!

Description of Problem

Proposed Solution

Additional Information

you missed the <script> and <template> tags which can be misleading for new coder who are gonna start learning vue but will be puzzled.. please make it right!
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 839bd37
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/660e950b93f4630008ca7447
😎 Deploy Preview https://deploy-preview-2784--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AloisSeckar
Copy link
Contributor

AloisSeckar commented Apr 4, 2024

Hi and thanks for suggestion. Assuming SFC syntax, your proposal would make sense. But Single-File Components are only one (though most common) way of using Vue. You can also have in-DOM templates directly in HTML and your logic can be placed in standalone .js file. Because of that is seems more logical to only annotate the codeblocks with js and template like it is, not to force newcommer into SFC syntax immideately.

SFC is introduced very soon after - with the necessary context that you need build phase to compile SFC into executable HTML and JS. Contrary to that you don't need build phase to use Vue. I personally didn't use Vue w/o build step yet, but it is one of its cool features for enhancing rather static sites.

@@ -32,6 +32,7 @@ Here is a minimal example:
<div class="options-api">

```js
<script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestion! However, we cannot simply put <script> tag in js code block. We'd need to have vue-html block (we can merge it with the next one) and then put the tag there:

<!--```vue-html -->
<script>
 // script part
 </script>

<template>
  // template part
</template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants