-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Misleading documentation - Section "Getting started" #2475
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
Comments
Thanks for opening the issue. Can you point us to the section that advises creating multiple applications? |
It is not explicitly said, that you should create multiple applications but the reader gets this impression. Under the headline "Declarative Rendering" an instance referencing on the div with id "app" is created. To me it looks like every div container should get it´s own application instance. Edit: It´ s not only this 2 occurrences. It´s the same in the examples below. |
Interesting :) I'd say this is the first time we get this feedback. How would you imagine this to be less confusing for beginners? |
Hey @phanan @PatrickRoesler, here's an idea to clarify and avoid confusion:
What do you folks think, would this help? If yes, I can PR 🙂 |
Thanks for chiming in @sarahdayan! The main reason why the IDs are different across the page is that the exact same scripts are executed under the hood (you can verify this by looking at the page's source code). Using only As said above, this literally is the first time we/I have this feedback. TBH, personally I don't see this as an issue and am tempting to close it unless more people say otherwise. |
@phanan Oh that’s true I forgot about the fact that the examples are executable! Do you think there would be value in explaining more about what is a Vue app and how it attaches itself to a single global DOM element, then fully controls it? As you said, this might be unnecessary since this feedback is unusual. |
Yeah, I think this might be beneficial for beginners who are absolutely new to a framework. Do you reckon this paragraph can be written in a way that conveys our new message too?
A PR is most welcome naturally :) |
@phanan On it 🙂 |
* fix: clarify how a Vue app works fixes #2475 * fix: simplify sentence * fix: remove unnecessary capitalization * fix: remove confusing wording
I wasn´t able to find the right place to report my problem, so I decided to create an issue. Please feel free to tell me, where I should place problems like the following:
Yesterday I started working with vue.js. After reading and understanding the "Getting started" section (https://vuejs.org/v2/guide/index.html) I started developing. Now, my colleagues told me, that I did something wrong: For each div-container I created a new Vue instance. So instead of creating one application with many components I created many application without any components.
I told to my colleagues, that I exactly did, what the documentation says. And they aggreed: The docs suggests to create many applications, so it´s misleading.
It would be very nice, if someone could make this point clear in the documentation.
Thanks in advance
Patrick
The text was updated successfully, but these errors were encountered: