Answers for ""react native" component dynamic children props"

1

"react native" component dynamic children props

const the_children = () => (<Text>Hello</Text>)
...
<Component children={the_children}></Component>
...
export const Component = ({ children }) => {
    return (
        <View> {!!children && children()} </View>
    );
};
Posted by: Guest on August-04-2021

Code answers related to ""react native" component dynamic children props"

Code answers related to "Javascript"

Browse Popular Code Answers by Language