You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If functional components are defined in Single File Components, one has to access the Vue instance differently than in the case of a non functional component.
For example, $slots is going to be slots().
Vetur currently doesn't recognize if one is using functional components on a template.
Reproducible Case
Define a .vue component and add the functional tag to the property.
Add property acces e.g. props.<propertyName> or slots e.g. slots().default. The build will work and the app will work in run time. But Vetur shows an error.
@ktsn I feel like that's a shot into the dark. It now seems pretty clear that functional templates are dropped. Only functional components created via scripts will be available, with the reason that there will be no real performance difference between non functional and functional.
So, from my point view, that's not something that should be tackled at all and can be closed.
Info
Problem
If functional components are defined in Single File Components, one has to access the Vue instance differently than in the case of a non functional component.
For example,
$slots
is going to beslots()
.Vetur currently doesn't recognize if one is using functional components on a template.
Reproducible Case
.vue
component and add thefunctional
tag to the property.props.<propertyName>
or slots e.g.slots().default
. The build will work and the app will work in run time. But Vetur shows an error.Additional information:
Similar issues
The text was updated successfully, but these errors were encountered: