I am trying to call the function with three parameter but its not working.
Here is the React.FC
:
const FormStructure: React.FC<{ record: ModelClass, question: Array<ModelClass>, dropdownItems: Array<ModelTypeClass> }> = ({
record, question, dropdownItems,
}) => {
...
}
and this is the function call:
return (
<Modal
visible={this.state.modalVisible}
onCancel={() => this.setState({ modalVisible: false })}
>
{FormStructure(record, this.state.question, this.state.dropdownItems)}
</Modal>
)
Following Error Message:
“Expected 1-2 arguments, but got 3”