When you are making an opensource lib, why would you want that method to be private? Why not allow the users to call whatever method they want, just a questions if somebody can answer
You might want to have the method be used internally by the component, and especially if the component is still being developed, the API might change (for example changing the parameters or return-value). If an end-user builds their app to rely on an internally-used method which then breaks because it should have been private, there is a problem).
I would have preferred if she stressed that calling child methods by the parent is a huge antipattern. Never do this, unless can't think of an idiomatic way to do it otherwise, because it breaks the props down / events up contract between parent / child. I'd love the child methods to be private by default, only being explicitly exposable, but that would break backward compatibility.
⚡ You can access the written tutorial for free here: buff.ly/3JP0jI7
Not gona lie, the last part flew over my head. Never seen render function used.
same bro. but render h function mostly used in functional components in vue
What theme do you use ?
Hi! Great tutorial thanks, I have a question related to syntaxes, how can I access expose in that case?
When you are making an opensource lib, why would you want that method to be private? Why not allow the users to call whatever method they want, just a questions if somebody can answer
You might want to have the method be used internally by the component, and especially if the component is still being developed, the API might change (for example changing the parameters or return-value).
If an end-user builds their app to rely on an internally-used method which then breaks because it should have been private, there is a problem).
Exposing everything and calling it a day isn't always a good idea.
Very good video. Do you know if using "expose" allows the private methods to be minified/uglified by the bundler?
I would have preferred if she stressed that calling child methods by the parent is a huge antipattern. Never do this, unless can't think of an idiomatic way to do it otherwise, because it breaks the props down / events up contract between parent / child. I'd love the child methods to be private by default, only being explicitly exposable, but that would break backward compatibility.
So how do I expose every method with `h()` without writing all of them out explicitly in `context.expose(..)`
Perfect! 👏
thank you very much, very useful explanation ✨
Neat! Thanks.
Thanks you
Why not use store instead, this practice makes the code not easy to read in the future
Hi Hermiona
Hermiona & Vue master = awesome combination ;-)
emma watson?
slowly vue just looks bloated and bad designed