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

Create routenames pkg for better reusability #4

Merged
merged 3 commits into from
Sep 29, 2024
Merged

Conversation

leomorpho
Copy link
Owner

@leomorpho leomorpho commented Sep 29, 2024

Originally, route names were defined in routes package. That was problematic as the variables pointing to the string literals could not be used in templates, and hence we had to use the string literals in the templates. This increased friction on maintainability (one could change the string literal in the routes package and hence break any usage in the pages package (if not careful, which has happened to me before...).

Now, the route names can be used as routenames.X throughout the code, improving maintainability and decreasing the changes to inadvertently break old routes.

@leomorpho leomorpho merged commit e9039be into main Sep 29, 2024
1 check failed
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.

1 participant