 
 		// If we can diff then apply it. Otherwise we just swap out the entire
 		// hierarchy.
-		if topElement.canDiff(otherElement) {
-			topElement.applyDiff(otherElement)
+		if rootElement.canDiff(otherElement) {
+			rootElement.applyDiff(otherElement)
 		} else {
-			topElement.derealize()
-			topElement = otherElement
+			rootElement.derealize()
+			rootElement = otherElement
 
 			if let hostView = hostView {
-				topElement.realize(self, parentView: hostView)
+				rootElement.realize(self, parentView: hostView)
 			}
 		}
 		


	private let render: S -> Element

	private var topElement: Element

	private var hostView: NSView?

	public init(render: S -> Element, initialState: S) {
		self.render = render
		self.state = initialState
		self.topElement = render(initialState)
	}
	
	// MARK: Lifecycle

		componentWillRealize()
		
		hostView = view
		rootElement.realize(self, parentView: view)
		
		componentDidRealize()
	}
