Commit a80274f
Fix tabs not updating stateful child components on tab switch
When switching tabs, SwiftUI reuses LoadedTabComponentView at the same
structural position, preserving @State from the previous tab's children
(e.g. Carousel page data, scroll index). Adding .id(selectedTabId)
forces a full view recreation on each tab switch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bfbca16 commit a80274f
File tree
1 file changed
+2
-0
lines changed- RevenueCatUI/Templates/V2/Components/Tabs
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
0 commit comments