Skip to content

Instantly share code, notes, and snippets.

@mficzel
Last active June 2, 2024 15:13
Show Gist options
  • Save mficzel/5c9c8e54f5a327123f07d762b34e2053 to your computer and use it in GitHub Desktop.
Save mficzel/5c9c8e54f5a327123f07d762b34e2053 to your computer and use it in GitHub Desktop.
Wrapper components
prototype(Vendor.Site:Example) < prototype(Neos.Fusion:Component) {
foo = null
bar = null
renderer = Neos.Fusion:Component {
# pass all outer props to the renderer
@apply.props = ${props}
# alternatively pass explicit props to the renderer
foo = ${props.foo}
# calculate additional props based on outer props
barTransformed = Neos.Fusion:Map {
items = ${props.bar}
itemRenderer = ...
}
renderer = afx`...`
}
}
@mficzel
Copy link
Author

mficzel commented Jun 2, 2024

Totally agree @private is nowadays the way to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment