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
.
To see the entirety of our component state, you can wrap it in an inspect call, which will pretty-print it on our document.
{{ inspect(state) }}
Join The Discussion! (0 Comments)
Please sign in or sign up for free to join in on the dicussion.
Be the first to Comment!