I have this component
const BoolComponent = ({ field1, Component1, Component2}) => {
//...
flag = functionGetBool(field1)
return flag ? Component1 : Component2
}
When I use it, is there any way to get the flag variable in my component? how can i get the answer's value?
<BoolComponent here i want to get the flag> </BoolComponent>
also here over:
<BoolComponent >
here i want to get the flag
</BoolComponent>