VueJS: change the value binding from a custom Directive?

I decided to write a few directives, looked off. documentation and source code directives on the vue is awesome.

Like understood, everything is clear except the moment the settings of the hooks.

Off documentation says:
All arguments, except for el, should be understood as read-only and never change them. If necessary to transmit information between the hooks is recommended to use the dataset.


Okay, all clear. Now look at the source code directives v-dragged , and I see that in line 16 there is an entry in the binding parameter.

Tell me did I understand correctly that the author has departed from a recommendation off. documentation and wrote the code is not quite correct (although working)?

Or I something do not understand?
March 20th 20 at 11:29
1 answer
March 20th 20 at 11:31
Solution
I see that in line 16 there is an entry in the binding parameter

Where you saw over there, is unclear. The call parameter is a function, this is no "entry parameter".
In hook inserted has 3 parameters, el, binding of vnodes. Based on the documentation all the parameters except el read-only. There is a parameter bindign. I can not understand it.

That is, to pass parameters to a value - code is the norm? - carey_Larson commented on March 20th 20 at 11:34
@jose_Senger25, "is working with" != "there is a record in". - enrico7 commented on March 20th 20 at 11:37
well, you can tell this is a normal code, from the point of view of rules of documentation? - carey_Larson commented on March 20th 20 at 11:40
@jose_Senger25, Yes, it's normal code. - enrico7 commented on March 20th 20 at 11:43
@aileen, thank you! - carey_Larson commented on March 20th 20 at 11:46
Hello! help me with a question? Why not get right to transform objects? - carey_Larson commented on March 20th 20 at 11:49

Find more questions by tags Vue.js