Empower Apps cover image

Behind the Scenes of SwiftUI with Aviel Gross

Empower Apps

How to Make Sure That Your State Can Utilize Mem Compare?

4min Snip

00:00
Play full episode
The fastest way is to use mem compare, which compares the bits in memory. POD views are simple enough that we can just compare the memory and not miss anything. If your view is POD, SwiftUI will use Memcompel; if it's not a POD, reflection. And then there is kind of like the thing in the middle, which is the double equals. That's where it starts to be confusing. The only way to focus your custom equality, for whatever reason, you need to use custom equality, you can wrap your view in Equitable View.

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode