* Desugar class properties to Object.defineProperty per spec * Define uninitialized static class properties with value=undefined * Make class-properties increased spec compliance opt-in (spec: true)
15 lines
365 B
JavaScript
15 lines
365 B
JavaScript
function withContext(ComposedComponent) {
|
|
return class WithContext extends Component {
|
|
|
|
static propTypes = {
|
|
context: PropTypes.shape(
|
|
{
|
|
addCss: PropTypes.func,
|
|
setTitle: PropTypes.func,
|
|
setMeta: PropTypes.func,
|
|
}
|
|
),
|
|
};
|
|
};
|
|
}
|