-
Notifications
You must be signed in to change notification settings - Fork 12
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
new component element and hot-reloading #74
Comments
To see hot reloading succeed and fail, check out branch hotreload1 which restores the old example tutorial program. Hot reloading works:
Hot reloading doesn't work:
|
My immediate thought is that this might be related to the |
When hot reloading the new Line 444 in 14ba471
We have old_comp.props = PropsDict({'children': []}) and parameters = [
0: ('self', <Parameter "self">)
1: ('args', <Parameter "*args: P.args">)
2: ('kwargs', <Parameter "**kwargs...P.kwargs">) So we get When hot reloading the parameters = [('self', <Parameter "self">)] |
This is the hard part. We must somehow construct a new Element, using the required constructor arguments, which are the kwargs props. It doesn't have to be the right props, because we can just assign the right props on the next line after the Element is constructed. But constructing it is tricky. Line 455 in 14ba471
|
The new
@component
elements don't work with hot reloading.I think it has something to do with this.
pyedifice/edifice/_component.py
Lines 660 to 665 in 14ba471
The text was updated successfully, but these errors were encountered: