# Chapter 6. Observing Objects

**URL:** <https://forums.kodeco.com/t/chapter-6-observing-objects/210863>\
**Category:** SwiftUI Apprentice\
**Created:** [April 17, 2025, 10:45pm UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863 "2025-04-17T22:45:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonh2023](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jasonh2023/32/110937_2.png) [@jasonh2023](https://forums.kodeco.com/u/jasonh2023)\
**Post date:** [April 17, 2025, 10:45pm UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863/1 "2025-04-17T22:45:01Z")

</div>

Hi I am wondering why this chapter is using the old @ObservableObject with @Published instead of the new @Observable? Is there going to be an updated version of the book that uses the new syntax?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [April 18, 2025, 1:09am UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863/2 "2025-04-18T01:09:05Z")

</div>

hi Jason! In section 3, I need to show how the main thread checker stops you from updating the UI from a background thread. `@Observable` doesn’t trigger the main thread checker.

---

<div class="post-metadata">

**Author:** ![jasonh2023](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jasonh2023/32/110937_2.png) [@jasonh2023](https://forums.kodeco.com/u/jasonh2023)\
**Post date:** [April 18, 2025, 2:31am UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863/3 "2025-04-18T02:31:44Z")

</div>

I looked at section 3 and found the area with the purple warning on the UI not being updated on the main thread. That makes sense and I am glad it is intentional in the book. I always wonder what tech to use as things change and it seems like most of the internet is gravitating towards doing away with the @ObservableObject style. I guess I will wait a bit.

I am wondering then if this is a bug in Swift/Apple for the @Observable ? I would think this should work the same and trigger the warning as well. Thoughts?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [April 18, 2025, 3:18am UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863/4 "2025-04-18T03:18:29Z")

</div>

Once you get into the habit of running UI updates on `Main`, feel free to use `@Observable`. If its current behavior is a bug, I expect Apple will fix it eventually. I think most developers haven’t even noticed this “bug”, as they all dispatch to `Main` automatically.

I came across it when I was trying to persuade a bootcamp cohort that they shouldn’t mark all their `@Observables` as `MainActor`. My argument was that the compiler wouldn’t tell them when they were running a slow task on `Main`, but the main thread checker would alert them to any attempts to update UI on a background thread. To my surprise, “demonstrating” this with `@Observable` didn’t work!

---

<div class="post-metadata">

**Author:** ![jasonh2023](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jasonh2023/32/110937_2.png) [@jasonh2023](https://forums.kodeco.com/u/jasonh2023)\
**Post date:** [April 18, 2025, 8:18pm UTC](https://forums.kodeco.com/t/chapter-6-observing-objects/210863/5 "2025-04-18T20:18:03Z")

</div>

Thanks for expanding on that! I think eventually I am going to try to get to @Observable after I finish this book and see how it goes. I may try to convert some of these to that and then make sure I get through the Swift Concurrency book to understand it more.
