Skip Fuse: State not updating correctly in view under NavigationLink
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
To repro: Run this in Skip Fuse. Launch the app, and tap the "Push" NavigationLink
import SwiftUI
struct ContentView: View {
@State var rootText = "pending"
@State var pushedText = "pending"
var body: some View {
NavigationStack {
VStack(spacing: 16) {
Text(rootText)
NavigationLink("Push") {
let _ = logger.debug("pushedText: \(pushedText)")
Text(pushedText)
.task { pushedText = "pushed" }
}
}
.task { rootText = "root" }
}
}
}
Expected: On iOS and Skip Lite, the first screen says "root", and the second screen says "pushed"
Actual: The first screen says "root", but the second screen says "pending". (And yet, if you check the logs, it says "pushedText: pushed"!)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied ContentView reproduction in Skip Fuse and compare its NavigationLink behavior with iOS and Skip Lite. Trace the state update from the pushed view's task through the displayed Text. Done means the second screen displays "pushed" rather than "pending" while preserving the logged "pushedText: pushed" value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100