-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ways to work with render as a method on a struct #14
Comments
Okay, I read in your documentation that you can just do. |
It appears that
This fails to compile with the following error:
|
This has to do with your "hello" string. It is Edit: also not to be unfriendly but slightly related issues aren't really the place for questions like yours. Either StackOverflow or IRC for short and easy questions would be preferred. |
thank you, that does make this example compile 😄. Now to figure out what I'm doing wrong in my actual program. |
When trying to structure a non-trivial application I would like to use objects that represent parts of the state which each have their own update and render functions. For
update
this is not an issue butrender
tends to have a huge type signature and (non-closure) functions don't allow you to let the compiler infer the return type using_
.While I appreciate the design of having typesafe Dom elements I still feel that this can be very limiting.
Are there any suggestions you have for addressing this?
I guess that implementing a macro that helps to create such a function with the correct return type could be an option.
The text was updated successfully, but these errors were encountered: