-
-
Notifications
You must be signed in to change notification settings - Fork 135
The Neos decorator
Wilhelm Behncke edited this page May 11, 2016
·
1 revision
A higher order Component, that can be used as a decorator for various Containers. The idea is to spread global configuration, that is obtained during initialization.
It will also enable us to pass a central api around, instead of accessing action creators directly. This will help to keep Host/Guest functionality in sync.
Here's a usage example:
@neos()
class MyComponent extends Component {
static propTypes = {
neos: PropTypes.object.isRequired
};
render() {
const {configuration} = this.props.neos;
return (<div>{configuration.someConfiguredValue}</div>);
}
}
A configuration object is currently passed via TypoScript in Resources/Private/TypoScript/Backend/Root.ts2
.