-
-
Notifications
You must be signed in to change notification settings - Fork 22
View to Component #81
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
View to Component #81
Conversation
@rmorshea I'm realizing a limitation with IDOM Core's Currently, because event handlers can't be JavaScript strings in IDOM core, inline events cannot be serialized into VDOM. For example, |
@Archmonger, that's actually more of an issue with React. If you assign |
I would say this is ends up being a pretty big limitation. When working within JavaScript frameworks, this issue doesn't really exist. I can't think of a safe way of fixing this. cough Even our existing Might want to document the limitation in core, probably within the |
On a different note, I think the revised tests for script, request, args, and kwargs are solid. |
Changelog
view_to_component
utility that supports both async and sync views. Views can be function or classes.src
anincludes
foldersview_to_component
IMPORTANT NOTE
This PR does not add automatic handling of things such as href click events or form submission. Currently
compatibility=True
is required to get href and forms to work.This is a desirable behavior that should be implemented in a future PR as a toggleable option.
In the future
view_to_component
should be able to automatically perform any URL routing/re-rendering that is needed. The VDOM component should essentially "act as if it's an iframe", despite it being VDOM.Remaining Todo: