Skip to content
New issue

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

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

Already on GitHub? # to your account

Router tweaks #94

Closed
japgolly opened this issue Mar 10, 2015 · 1 comment
Closed

Router tweaks #94

japgolly opened this issue Mar 10, 2015 · 1 comment
Labels
Milestone

Comments

@japgolly
Copy link
Owner

From MainRouter in ochrons/scalajs-spa-tutorial.

I noticed two things:
BaseUrl is initalised with a custom function instead of one of the helpers on BaseUrl. Are the built-in helpers not enough? (Why?) If so, should we move that takeWhile function into BaseUrl as a new helper?
val routerEngine = ... ; val router = .... There are already defs in RouterRules that do the same thing. > Do you I think I should just change them to vals?

the defs create a new router every time they are called, so that's why I put it into a val
routerComponent is realistically used only once, so it doesn't really matter, it could be def as well
the BaseUrl stuff is just to support the client-only version, where the URL contains a long path into the "filesystem" due to the way the workspace plugin works

@japgolly japgolly modified the milestone: 0.9.0 Apr 23, 2015
japgolly added a commit that referenced this issue May 17, 2015
New router that:
* uses an ADT to represent pages
* allows rules to be composed and then modified collectively
* clarifies the difference between Router component and controller
* accomodates stateful logic

Addresses #96, #103, #102, #94
japgolly added a commit that referenced this issue May 17, 2015
New router that:
* uses an ADT to represent pages
* allows rules to be composed and then modified collectively
* clarifies the difference between Router component and controller
* accomodates stateful logic

Addresses #96, #103, #102, #94
@japgolly
Copy link
Owner Author

Resolved via 93bbc5f

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant