-
Notifications
You must be signed in to change notification settings - Fork 87
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
Ergonomic Improvements for perseus::template::Template
#57
Comments
I like the |
Okay, |
…ation This makes Perseus significantly more ergonomic. Partially addresses #57.
I've added a |
I've also now added a macro that will do serialization and deserialization of custom props automatically, which reduces the number of |
Okay, I think the new macros are a pretty good solution to the problems of Perseus' ergonomics, so I'm going to close this issue. @lukechu10 please let me know if you think there's anything else in particular that should be done! |
Looks great! |
Is your feature request related to a problem? Please describe.
The current way of defining a template is somewhat boilerplate heavy (taken from https://arctic-hen7.github.io/perseus/en-US/docs/0.3.x/templates/intro):
Describe the solution you'd like
A simple way of slightly improving this would be to get rid of the
Rc::new
s by accepting aimpl Fn(Option<String>)
instead.Another possible solution would be to add the ability to set a component as the template function. Something like:
Describe alternatives you've considered
Leave it the way it is
The text was updated successfully, but these errors were encountered: