You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my perspective, one of the primary functions of a router is to decouple the presentation methodology.
IOW, the code says "I want to display a payment screen." That code shouldn't care if the payment screen is added to the stack, or presented in a modal sheet or In a full-screen cover.
Whereas this code is explicitly defining the process from within the view.
Button("Go to Detail View") {
router.push(.detail)
}
What if you had...
Button("Go to Detail View") {
router.route(.detail)
}
And then add some additional mechanism for the Route to determine the proper course of action?
(Added this as Issue since Discussions not enabled for the project.)
This discussion was converted from issue #1 on December 17, 2023 20:28.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
From my perspective, one of the primary functions of a router is to decouple the presentation methodology.
IOW, the code says "I want to display a payment screen." That code shouldn't care if the payment screen is added to the stack, or presented in a modal sheet or In a full-screen cover.
Whereas this code is explicitly defining the process from within the view.
What if you had...
And then add some additional mechanism for the Route to determine the proper course of action?
(Added this as Issue since Discussions not enabled for the project.)
Beta Was this translation helpful? Give feedback.
All reactions