DEV: gives didRender and willRerender hooks to widgets (PR #10496)

didRender will be called each time the widget is rendered willRerender will be called the second time a widget is rendered to give an opportunity to clean some state before the tree is replaced


@eviltrout This is a naive implementation, but it works quite well, if you think that’s the right path I can try to dig more in that direction.

This could be a good approach and I am willing to give it a shot.

However I do wonder if looping through all the nodes recursively, then reversing the list is a bit wasteful.

Could we replace the function with a depth first search instead? I think that’s more accurate than reverse in this case because you will want every branch to be visited backwards.

1 Like

@eviltrout I changed the looping. It’s not very fancy, but it does from top to bottom following the hierarchy of each node.