Add setParentProps static util method for building a hierarchy.