Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Router.In, Router.Out, Router.Shared and Router traits #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

arturaz
Copy link
Contributor

@arturaz arturaz commented Feb 24, 2025

@arturaz arturaz requested a review from raquo as a code owner February 24, 2025 13:53
Copy link
Owner

@raquo raquo left a comment

Choose a reason for hiding this comment

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

Thanks, please see questions/comments below.

/** The covariant side of the router. */
trait Out[+BasePage] extends Shared {
/** @see [[Router.currentPageSignal]] */
def currentPageSignal: StrictSignal[BasePage]
Copy link
Owner

@raquo raquo Feb 25, 2025

Choose a reason for hiding this comment

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

Latest version LGTM except that def currentPageSignal and def origin both should be val-s. The origin is not supposed to be lazy or changeable, and currentPageSignal can't really be implemented as a def because it pretty much has to have side effects inside (so if we did implement it as a def, it would likely be incorrect) (also there should be no reason to implement it as a def).

@arturaz
Copy link
Contributor Author

arturaz commented Mar 5, 2025

Anything else to do here @raquo ?

@raquo
Copy link
Owner

raquo commented Mar 5, 2025

All is good, just need to find the time to merge & release

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.

2 participants