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

Enrich the registration.md documentation with an example for application-wide global registration of "App" components #2716

Closed
wants to merge 1 commit into from

Conversation

JeremieLitzler
Copy link
Contributor

Description of Problem

As I was going through the VueSchool.io courses and their original Masterclass on Vue 3, I set out to build the project using Vite, Vue 3 and TypeScript.

At the global registration lesson, I saw that the Vue 3 documentation didn't include the code snippet the Vue 2 documentation included.

Proposed Solution

The update adds a code snippet to give an example about how to dynamically import the components that we'd want to be globally available.

It was included in the Vue 2 docs, so it could be a good addition to the Vue 3 docs as well.

Inspired by https://zerotomastery.io/blog/how-to-auto-register-components-for-vue-with-vite/ but uses a older and JavaScript solution.

Additional Information

None

The update adds a code snippet to give an example about how to dynamically import the components that we'd want to be globally available.

It was included in the VUe 2 docs, so it could be a good addition to the Vue 3 docs as well. 

Inspired by https://zerotomastery.io/blog/how-to-auto-register-components-for-vue-with-vite/
Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 65e9bac
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/65def287677e8d000809919e
😎 Deploy Preview https://deploy-preview-2716--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.

@NataliaTepluhina
Copy link
Member

@JeremieLitzler

Thank you for your contribution! I like the snippet but I believe it would make the component registration documentation unnecessarily complex. The old Cookbook section in the old docs would be a perfect place for such a snippet, maybe Examples could work too?

@JeremieLitzler
Copy link
Contributor Author

@JeremieLitzler

Thank you for your contribution! I like the snippet but I believe it would make the component registration documentation unnecessarily complex. The old Cookbook section in the old docs would be a perfect place for such a snippet, maybe Examples could work too?

Do you mean here https://github.com/vuejs/docs/tree/main/src/examples ?

If so, I can see to work something out.

@bencodezen bencodezen added the state: needs-changes PR requires changes to proceed label Mar 13, 2024
@NataliaTepluhina
Copy link
Member

@JeremieLitzler yes, I meant the Examples section (sorry for the delayed answer, I was on vacation)

@NataliaTepluhina
Copy link
Member

Closing the PR as stale. Please feel free to reopen if you'd like to apply the suggested changes

@JeremieLitzler
Copy link
Contributor Author

@NataliaTepluhina : I'll for sure. I need to plan it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs-changes PR requires changes to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants