A prop is data a component receives from outside itself. When a view is split into smaller components, the parent passes each child the values it needs. In the simplest version, components are functions that generate virtual DOM, and their arguments are props. section 3.8.3
Pass a value the child cannot know
A to-do list knows each item's position, but an individual item does not. The list calls `TodoItem({ todo, i, edit }, emit)`, passing the index `i` as a prop. The child can then use that index when an edit or remove event needs to identify the item. The index is relevant to the child without being part of the application's state. section 6.3.3
In a stateful component, keep two responsibilities distinct: `props` holds data received from the parent; `state` holds data maintained internally. A constructor can store incoming props and pass them to `state(props)` to choose an instance's initial state. For example, a counter can initialize its count from `props.initialCount`, falling back to zero. section 9.1.1 section 9.3
Do not change a component's `props` property directly: the component would not know to update its view. Instead, `updateProps(props)` merges incoming values into the current props and patches the component's view. When a parent changes, virtual DOM patching extracts a child's new props, calls that child's `updateProps()`, and retains the component instance. section 9.1.1 section 11.1.4
Props carry data from parent to child; events provide the return path. A child can emit an event that its parent subscribes to. Even the root component can receive props: `createApp(RootComponent, props)` uses them when creating its component virtual node. section 11.0 section 12.4




