frzi / swiftui-router

Path-based routing in SwiftUI
MIT License
900 stars 43 forks source link

Set Route View `id` as `self.path` #48

Open hxperl opened 2 years ago

hxperl commented 2 years ago

I'm using SwiftUIRouter library on company Product, and encounter this issue frequently. https://github.com/frzi/SwiftUIRouter/issues/39

I think that it is better to designate the Rotue's View id as self.path directly in the library than to individually.

frzi commented 2 years ago

Hm interesting. I figured if .id() was the fix for this cursed bug then it would be on the Route's Group view instead. I'll have a play with this before pulling.

3a4oT commented 2 years ago

Hey, do you have an update on it?

frzi commented 2 years ago

Sorry for the radio silence. There's still some testing regarding this - as this can be considered a breaking change. Adding an .id() to anything to SwiftUI can have dramatic side effects regarding states et al.