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

Docs: unobvious warning in custom-directives #2849

Closed
xiaodong2008 opened this issue May 2, 2024 · 4 comments · Fixed by #2850
Closed

Docs: unobvious warning in custom-directives #2849

xiaodong2008 opened this issue May 2, 2024 · 4 comments · Fixed by #2850

Comments

@xiaodong2008
Copy link
Contributor

In the Usage on Components of custom-directives page, there is an unobvious warning: In general, it is not recommended to use custom directives on components.

I think we need to change this to a warning block.

Refers to: https://vuejs.org/guide/reusability/custom-directives.html#usage-on-components

@xiaodong2008 xiaodong2008 changed the title Docs: not obvious warning in custom-directives Docs: unobvious warning in custom-directives May 2, 2024
@NataliaTepluhina
Copy link
Member

@xiaodong2008 we are trying to avoid warnings in the docs as much as possible (as they tend to break the reader's flow and are quite distracting). Do you think the benefits of having a warning outweigh the distraction from the warning?

@xiaodong2008
Copy link
Contributor Author

Yes, as per the description in the document, the custom directives part may cause some unexpected results and it is not recommended, so I think adding a warning is better than just adding a conclusion at the end.

The warning should be added at the top part of custom directives.

@NataliaTepluhina
Copy link
Member

@xiaodong2008 would you like me to add the change or would you prefer to create a PR?

@xiaodong2008
Copy link
Contributor Author

I’ll create a PR to make this change, thanks for your suggestion!

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 a pull request may close this issue.

2 participants