public void Render(NewState newState) { var root = createTree(); var next = UpdateTree(newState, root); if (!ReferenceEquals(currentElement, null) && !ReferenceEquals(next, currentElement)) { UnmountComponents(currentProps); detachChildFromRoot(Parent, currentElement); } attachChildToRoot(Parent, next); currentProps = root; currentElement = next; }
public TElement UpdateTree(NewState newState, SharpProp next) { return(VisitAll(0, newState, currentProps, next)); }
public NewState(SharpProp props, object state) { Props = props; State = state; }