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
Everything the component needs is passed through `options`, which is an object containing:
319
+
Everything the component needs is passed through `context`, which is an object containing:
320
320
321
321
-`props`: An object of the provided props
322
322
-`children`: A function returning the children
323
323
-`slots`: A function returning a slots object
324
324
-`data`: The entire data object passed to the component
325
325
-`parent`: A reference to the parent component
326
326
327
-
After adding `functional: true`, updating the render function of our anchored heading component would simply require adding the `options` argument, updating `this.$slots.default` to `options.children`, then updating `this.level` to `options.props.level`.
327
+
After adding `functional: true`, updating the render function of our anchored heading component would simply require adding the `context` argument, updating `this.$slots.default` to `context.children`, then updating `this.level` to `context.props.level`.
328
328
329
329
Since functional components are just functions, they're much cheaper to render. They're also very useful as wrapper components. For example, when you need to:
0 commit comments