Closed mornir closed 4 years ago
That's great suggestion! I guess that using <slot/>
would also prevent that issue from happening:
https://github.com/sanity-io/sanity/issues/1827
So it's no longer necessary to check for "children[0] && children[0].text".
Thanks for this.
Since Vue 2.5.0, it's very easy to turn Vue template components into functional components by adding the 'functional' attribute. I thought it would nice to add an example here. The advantages are that props don't need to be defined and such components are much cheaper to render.