Props allow us to pass data from outside our component into the component's state. They're incredibly useful for setting default values and propagating state through different levels of our components.
Understanding Props
Props are set directly on a $props
object within the state of our component. However, they are also readily available directly off the state itself, which is just called state
.