prop spreading (support attribute blocks)
p-98 opened this issue · comments
I am trying to translate jsx with prop spreading to pug
<div {...attributes} />
The only possibility I was able to come up with was
div&attributes(attributes)
Unfortunately this currently throws Attribute blocks are not yet supported in react-pug
.
It would be awesome to see this feature supported. Or is there any other solution?
@p-98 hey, have you tried div(...attributes)
?
It works different ways, you can play here:
https://react.pugjs.org/repl#%7B%22code%22:%22ZXhwb3J0IGNvbnN0IFJlYWN0Q29tcG9uZW50ID0gcHJvcHMgPT4gcHVnYAogIGRpdiguLi5wcm9wcy5hdHR0cmlidXRlcykKICAKICBkaXYoLi4uYXR0cmlidXRlcykKYA==%22%7D