-
Notifications
You must be signed in to change notification settings - Fork 0
Nested StatefulWidgets working? #9
Comments
Thanks for pointing this out. I'm thinking that this is probably an error in my implementation of StatefulWidgets, which holds a Map from instances of This can be changed, because Widget classes can potentially be instantiated every time a render is called. What I'll probably do instead of using the Widget instance itself is storing the But what I really will do is peek at the implementation of |
I think that the root of this is the way that As it is, the root element is instantiated once, and rendered against, but on subsequent re-renders, child nodes are inevitably re-instantiated. A smarter solution would be for Mariposa to keep track of the rendered tree (which is just |
Ah, that might make sense. I saw some weird stuff happening WRT rendering in general. Sometimes the Div would be replaced properly, other times it wouldn't. I'll try to create a minimal test case |
Thanks, appreciate it. The current renderer is something of a hack, but with some love it can work well, and be unit tested. |
Hey hey :) Really cool work!
I saw you'd added StatefulWidgets and decided to take this lib for a spin! I made this following sample app: https://github.com/brianegan/github_search_angular_flutter/tree/master/mariposa_app
I ran into one funny issue:
GithubApp
createState
is never called, subscription never establishedSolution: Convert
GithubApp
into a function. StatefulWidget'screateState
function is called correctly.The text was updated successfully, but these errors were encountered: