Answer the question
In order to leave comments, you need to log in
Pass jsx to prop?
Please tell me how can I pass jsx to the prop for example:
const A = ({children, footer}) => (
<View>
{children}
<View>
{/*тут условно какая-то супер-крутая верстка для футера*/}
{footer}
</View>
</View>
)
const B = () => {
const footer = () => (
<View>
<Text>
footer
</Text>
</View>
)
return (
<View>
<A footer={footer}>
<Text>
lorem
</Text>
</A>
</View>
)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question