Today, in React, the way components are written is how props is passed.
Sub-component A:
const A = ({arg1,arg2}) => {
...
}
parent component B:
const B = () => {
<A arg1={method1} arg2={method2} />
}
Why are the function parameters in An enclosed in curly braces {} instead of being written as const A = (arg1,arg2)
?