 
 	private let renderFn: ((Component<S>, S) -> Element)?
 
-	private var rendering: Bool = false
-
-	private var renderQueued: Bool = false
+	private var needsRender: Bool = false
 
 	/// Initializes the component with its initial state. The render function 
 	/// takes the current state of the component and returns the element which 

	}

	private func update() {
		if rendering {
			renderQueued = true
			return
		}

		rendering = true

		let newRoot = render(state)
		let oldRoot = rootRealizedElement
		if let oldRoot = oldRoot {

		state = fn(oldState)
		
		if componentShouldUpdate(oldState, newState: state) {
			enqueueRender()
		}
	}

	private func enqueueRender() {
		if needsRender { return }

		needsRender = true

		let observer = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, CFRunLoopActivity.Exit.rawValue, 0, 0) { _, _ in
			self.update()
			self.needsRender = false
		}
		CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopDefaultMode)
	}

	/// Get the current state of the component.
