diff --git a/lib/document.js b/lib/document.js
index 65cff06a..07fdf4e4 100644
--- a/lib/document.js
+++ b/lib/document.js
@@ -1,63 +1,16 @@
-import React, { Component, PropTypes } from 'react'
+import React from 'react'
import htmlescape from 'htmlescape'
-export default class Document extends Component {
- static childContextTypes = {
- _documentProps: PropTypes.any
- }
-
- getChildContext () {
- return {
- _documentProps: this.props
- }
- }
-
- render () {
- return
-
-
-
-
-
-
- }
+export default ({ head, css, html, data, dev, staticMarkup }) => {
+ return
+
+ {(head || []).map((h, i) => React.cloneElement(h, { key: i }))}
+
+
+
+
+ {staticMarkup ? null : }
+ {staticMarkup ? null : }
+
+
}
-
-export function Head (props, context) {
- const { head, css } = context._documentProps
- const h = (head || [])
- .map((h, i) => React.cloneElement(h, { key: '_next' + i }))
- return
- {h}
-
-
-}
-
-Head.contextTypes = { _documentProps: PropTypes.any }
-
-export function Main (props, context) {
- const { html, data, staticMarkup } = context._documentProps
- return
-
- {staticMarkup ? null : }
-
-}
-
-Main.contextTypes = { _documentProps: PropTypes.any }
-
-export function DevTools (props, context) {
- const { hotReload } = context._documentProps
- return hotReload ? : null
-}
-
-DevTools.contextTypes = { _documentProps: PropTypes.any }
-
-export function NextScript (props, context) {
- const { dev, staticMarkup } = context._documentProps
- if (staticMarkup) return null
- const src = !dev ? '/_next/next.bundle.js' : '/_next/next-dev.bundle.js'
- return
-}
-
-NextScript.contextTypes = { _documentProps: PropTypes.any }