Improvement suggestion for Chapter 7

Under the section: “Making Ratings Reactive”

Add a new modifier to Image:

.onChange(of: ratings) { _ in
  convertRating()
}

This code should be added to HStack. If you add it to Image, it will run 5 times each time the rating changes. Move it to HStack will only run once.

By the way, the book is great. Thank you for your great work.

3 Likes

Excellent suggestion - thank you :smiling_face:. I’m glad you’re enjoying the book!