Skip to content

Custom Directive API Change #32

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

Merged
merged 3 commits into from
Nov 12, 2019
Merged

Custom Directive API Change #32

merged 3 commits into from
Nov 12, 2019

Conversation

yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Apr 12, 2019

  • Re-design custom directive API so that it better aligns with component lifecycle

  • Custom directives usage on components will follow the same rules as discussed in the Attribute Fallthrough Behavior RFC. It will be controlled by the child component via v-bind="$attrs".

Rendered

@yyx990803 yyx990803 added breaking change This RFC contains breaking changes or deprecations of old API. core 3.x This RFC only targets 3.0 and above labels Apr 12, 2019
@zhangenming
Copy link

image

this will be better?

componentUpdated -> removed ,use updated instead

@Gnuk
Copy link

Gnuk commented Jul 3, 2019

@zhangenming, I think it's the same case as bind -> beforeMount, inserted -> mounted and unbind -> unmounted, so this suggestion may not be needed for me.

@ycmjason
Copy link

is there any ways to incorporate setup() and reactivity in custom directive? or will it not serve the purpose of directives?

@yyx990803
Copy link
Member Author

This RFC is now in final comments stage. An RFC in final comments stage means that:

The core team has reviewed the feedback and reached consensus about the general direction of the RFC and believe that this RFC is a worthwhile addition to the framework.
Final comments stage does not mean the RFC's design details are final - we may still tweak the details as we implement it and discover new technical insights or constraints. It may even be further adjusted based on user feedback after it lands in an alpha/beta release.
If no major objections with solid supporting arguments have been presented after a week, the RFC will be merged and become an active RFC.

@yyx990803 yyx990803 added the final comments This RFC is in final comments period label Nov 6, 2019
@yyx990803 yyx990803 merged commit a2fb970 into master Nov 12, 2019
@yyx990803 yyx990803 added feat: directives Changes related to directives and removed final comments This RFC is in final comments period labels Jul 1, 2020
@bencodezen bencodezen mentioned this pull request Jul 6, 2020
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x This RFC only targets 3.0 and above breaking change This RFC contains breaking changes or deprecations of old API. core feat: directives Changes related to directives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants