Skip to content

Add an FAQ for creating new projects #1225

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 1 commit into from
Closed

Conversation

skirtles-code
Copy link
Contributor

The number of decisions involved in creating a new Vue project has increased over time. This is leading to problems, especially for new users, who are unsure which combination of options to choose.

This FAQ aims to provide guidance on what options to choose when creating a new project. It tries to strike the difficult balance between offering clear advice, while avoiding giving the impression that any other path is unacceptable, deprecated, or otherwise unsupported.

Longer term, many of these questions will be answered via the new documentation. This FAQ is an interim solution while those docs aren't yet available.

It is currently marked as a draft. This is to ensure that everyone gets chance to give feedback before it is merged. It is ready for review.

I've placed this FAQ in its own section, at the end of the guide. I wasn't really sure where else to place it. I didn't want to interrupt the flow of the existing guides. We may want to link to it from the Installation guide or elsewhere.

Copy link

@HoldYourWaffle HoldYourWaffle left a comment

Choose a reason for hiding this comment

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

If I could approve this twice I would.


Using `render` functions instead of templates is a bigger jump. Using `render` functions provides a lot of extra flexibility, but at the expense of code that most developers find more difficult to read. We recommend sticking to templates for most application components and only using `render` functions for more complex components that need the extra flexibility. Highly reusable components, such as those found in component libraries, often use `render` functions. It's perfectly normal for a large project to have a handful of components that use `render` functions, especially if you aren't using a third-party component library.

JSX can help to make using `render` functions a little more developer friendly. For most projects, it isn't worth introducing JSX for just a handful of components, but we provide official tooling for using JSX in SFCs to make it as easy as possible. This can also be an appealing option if you've got a background in React.

Choose a reason for hiding this comment

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

Maybe you could add a link to the mentioned tooling?


Prior to the introduction of `<script setup>`, the Options API was usually an easier way to start learning Vue. With the addition of `<script setup>` in Vue 3.2, it is now possible to introduce the Composition API at a much earlier stage in the documentation.

The current guides introduce Vue using a global/CDN approach. Avoiding tooling allows us to jump straight in with writing code, without worrying about whether the reader has prior experience of tools like `npm` or `webpack`. That decision made sense when the documentation was first written, but it increasingly makes the documentation feel disconnected from how real Vue applications are built. The new documentation should also help to tackle this problem.

Choose a reason for hiding this comment

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

Slightly unrelated side-note: I 100% agree with this feel of disconnectedness, it was by far the most difficult part of teaching people Vue last summer.

@skirtles-code
Copy link
Contributor Author

I'm going to close this. The new documentation is due to be released shortly so there's no longer any need for a stopgap.

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

Successfully merging this pull request may close these issues.

3 participants