frzi / swiftui-router

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

view init twice when navigate #34

Closed BearChao closed 2 years ago

BearChao commented 2 years ago

I used init() for Initialize the model. But I found that courent view init() ran twice when I navigate to another path.

I print the model's id, you can find that model id is different when navigate to another path.

image