Open
Description
What is "Render Props"?
https://reactjs.org/docs/render-props.html
It's important to use this because Context API works via this approach. React is currently testing hooks, which will simplify the whole work with pug, but still we need to either have a good support of it or add information to the README.
How it works now
So now we support this way to use render props:
function render(item) {
return pug`
p= item
`
}
const test = pug`
Child
${item => pug`
p item
`}
Prop(children=${item => pug`
p item
`})
ExternalChild
= render
ExternalProp(children=render)
`
How to improve?
I'm happy to know any crazy idea to make it more attractive in use.
Metadata
Metadata
Assignees
Labels
No labels