Group Group Group Group Group Group Group Group Group

Chapter 2, referencing variables

In the class “_RecipeDetailState” in the text widget, the variable is “widget.recipe.label” I don’t understand why widget is necessary in the variable reference… why can’t you just use recipe.label?

1 Like

That’s because recipe is a property of the RecipeWidget, which is accessed through the State's widget property.

1 Like