Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
challenge update
Browse files Browse the repository at this point in the history
  • Loading branch information
fyy26 committed Feb 12, 2024
1 parent 4021864 commit 9678edc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/lectures/04-state-management/live-demo-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ struct TaskItemView: View {
}
```

## Step 12: Refactoring to Use `@EnvironmentObject` for Task List

Remember how we said it's bad to use classes until absolutely necessary? Here, you can keep `TodoItem` a struct by using
a `@EnvironmentObject` to store the list of tasks. Try it out yourself! You may also find `@StateObject` useful when
initializing the object you use to keep track of the list of tasks.

## Conclusion

Great! You've just created your first full app from scratch. You can now call yourself an iOS developer. 😎

0 comments on commit 9678edc

Please sign in to comment.