 	}
 }
 
-public class ScrollView_<LOL>: Component<[Element]> {
-	public let elements: [Element]
+public typealias ScrollView = ScrollView_<CGRect>
+public class ScrollView_<LOL>: Component<CGRect> {
+	public var elements: [Element]
 
 	public init(_ elements: [Element]) {
 		self.elements = elements.reverse()
-		super.init(render: ScrollView_.render, initialState: [])
+		super.init(render: ScrollView_.render, initialState: CGRectZero)
 	}
 
-	private class func render(c: Component<[Element]>, visibleElements: [Element]) -> Element {
+	private class func render(c: Component<CGRect>, visibleRect: CGRect) -> Element {
 		let component = c as! ScrollView_
 
-		return ScrollViewElement(component.didScroll)
+		let visibleElements = component.calculateVisibleElements(visibleRect)
+
 			.direction(.Column)
 			.children([
 				ScrollViewContent(layoutChildren: component.elements)

	}

	final private func didScroll(visibleRect: CGRect) {
		let visibleElements = elements.filter { CGRectIntersectsRect(visibleRect, $0.frame) }
		updateState { _ in visibleElements }
	}
}

		didScroll(scrollView.contentView.visibleRect)
	}
}

private class ScrollViewElement: Element {
	private let didScroll: CGRect -> ()
