I'm getting the error message:
Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it
when I'm trying to do the part of code which is bellow in the return section of react.
{showModal
&&
(() => dispatch(
ActionsCore.openDialog({
class: 'modal-lever',
overlay: 'Overlay',
close: false,
children: (
<NewCalc message={modalMessage} handleCalcNew={() => calcNew()} />
)
})
))
}
I don't have a clue of what I'm doing wrong. Any advice?
Thank you!