Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just curious, but have you tried the `equatable()` modifier?

It's doc description seems to be closer to what you need than the `id()` modifier.

<https://developer.apple.com/documentation/swiftui/view/equat...>

> Prevents the view from updating its child view when its new value is the same as its old value.

Also, https://swiftwithmajid.com/2020/01/22/optimizing-views-in-sw...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: