Last active
June 2, 2024 15:13
-
-
Save mficzel/5c9c8e54f5a327123f07d762b34e2053 to your computer and use it in GitHub Desktop.
Wrapper components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`...` | |
} | |
} |
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
FYI: in the meantime private props can be used to achieve the same without the drawbacks mentioned above