Closed pardom closed 4 years ago
Todo:
What should we use as a metaphor for delegated components?
Options:
Screen
Component
Delegate
Node
Nice job!
As far as the naming I would try to stay away from Component
. In the Elm community it's actively suggested to not think in terms of "Components" as it doesn't help get out of an OOP mindset. This goes into it a little bit more https://guide.elm-lang.org/webapps/structure.html.
I often see these referred to as Page
or Triplet
(Model + View + Update). Page
seems more familiar in web but Screen
is similar. Screen
is also used in other navigation libraries.
Good call-out. Currently, I'm using route
for naming. Thoughts there? Also, perhaps this class should be a function that returns a triplet rather than an abstract class. That will make composition easier and steer this back away from OOP.
@torresmi does this seem like a reasonable name based on your experience in the Elm community? https://github.com/oolong-kt/oolong/pull/98/files#diff-cbd24fbe67157c95eff785c89b2b07c7R12
Yep! I like it.
Closing this PR and moving work to another project.
Adds an abstraction over navigation which handles route changing, component delegation, and state caching. Example usage in the README.
Let's discuss! @oolong-kt/developers