 		didScroll(scrollView.contentView.visibleRect)
 	}
 }
-
-public typealias ScrollView = ScrollView_<[Element]>
 
 private class ScrollViewElement: Element {
 	private let didScroll: CGRect -> ()

	}
}

public class ScrollView_<LOL>: Component<[Element]> {
	public let elements: [Element]

	public init(_ elements: [Element]) {
		self.elements = elements.reverse()
		super.init(render: ScrollView_.render, initialState: [])
	}

	private class func render(c: Component<[Element]>, visibleElements: [Element]) -> Element {
		let component = c as! ScrollView_

		return ScrollViewElement(component.didScroll)
			.direction(.Column)
			.children([
				ScrollViewContent(layoutChildren: component.elements)

	}

	final private func didScroll(visibleRect: CGRect) {
		updateState { _ in visibleRect }
	}

	final private func calculateVisibleElements(visibleRect: CGRect) -> [Element] {
		return elements.filter { CGRectIntersectsRect(visibleRect, $0.frame) }
	}
	}
}
