Currently rt-template allows to define a component and to pass it via props to the parent component as a factory function (a function that creates an element).
Now such function is available only to the calling element, and not the current element despite it being defined in its scope.
I propose to extend the syntax allowing the factory function to be used in the same component where rt-template appears.
In the above example function="greeter" tells to not pass the template to props but instead make it available in the current scope with the name greeter.
Currently
rt-template
allows to define a component and to pass it viaprops
to the parent component as a factory function (a function that creates an element).Now such function is available only to the calling element, and not the current element despite it being defined in its scope.
I propose to extend the syntax allowing the factory function to be used in the same component where
rt-template
appears.An example:
In the above example
function="greeter"
tells to not pass the template toprops
but instead make it available in the current scope with the namegreeter
.