mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
9df59c1176
* Layout ground works for next/async * Implement the Dynamic Bundle feature. * Add some test cases. * Update README. * Implement props aware dynamic bundle API. * Update tests and README. * Add a test case for React Context support.
16 lines
270 B
JavaScript
16 lines
270 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
export default class extends React.Component {
|
|
static contextTypes = {
|
|
data: PropTypes.object
|
|
}
|
|
|
|
render () {
|
|
const { data } = this.context
|
|
return (
|
|
<div>{data.title}</div>
|
|
)
|
|
}
|
|
}
|