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

Refactor HarmonyRouterDelegate pages property #29

Open
GikuyuNderitu opened this issue Jun 3, 2021 · 0 comments
Open

Refactor HarmonyRouterDelegate pages property #29

GikuyuNderitu opened this issue Jun 3, 2021 · 0 comments

Comments

@GikuyuNderitu
Copy link
Collaborator

The HarmonyRouterDelegate's pages prop is currently composed of a messy if/else decision structure to declarative routing structure of the application. Instead of this structure, provide a Map data structure that maps defined a defined HarmonyPage enum to a given PageBuilder where PageBuilder is defined as:

typedef PageBuilder = Page Function<T extends PageBuilderArguments>(T);
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

No branches or pull requests

1 participant