new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vue · all subjects

props & emits

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

$props property

$props is an object representing the component's current, resolved props. Only props declared via the props option will be included. The component instance proxies access to the properties on its props object. Type: object. This property is readonly.

$attrs property and fallthrough attributes

$attrs is an object that contains the component's fallthrough attributes. Type: object. Fallthrough Attributes are attributes and event handlers passed by the parent component, but not declared as a prop or an emitted event by the child. By default, everything in $attrs will be automatically inherited on the component's root element if there is only a single root element. This behavior is disabled if the component has multiple root nodes, and can be explicitly disabled with the inheritAttrs option. This property is readonly.

$emit() method signature

$emit is used to trigger a custom event on the current instance. Signature: $emit(event: string, ...args: any[]): void. Any additional arguments will be passed into the listener's callback function.

$emit() usage example

$emit usage: this.$emit('foo') for an event-only emission, or this.$emit('bar', 1, 2, 3) with additional arguments.

Give your agent this brain