Skip to content

Conversation

@stephencelis
Copy link
Member

The UIKit equivalent of NavigationLink(state:).

/// - Parameter state: An element of stack state.
public func callAsFunction<Element: Hashable>(state: Element) {
@Dependency(\.stackElementID) var stackElementID
self(value: StackState.Component(id: stackElementID(), element: state))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reports an issue under the hood, so we should probably thread through the source context, but we need to make changes to Swift Navigation and cut a release to do that.

Copy link

@mdarnall mdarnall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stephencelis. This will be useful to properly drive a NavigationStackController from a Store with StackState

@stephencelis stephencelis merged commit a5b96e3 into main Feb 25, 2025
15 checks passed
@stephencelis stephencelis deleted the uipushaction-state branch February 25, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants