Getting Uncaught SyntaxError: Unexpected token ‘

In this code:

const Label = ( props ) => {
    const { PaymentMethodLabel } = props.components
    return <PaymentMethodLabel text={ label } /> /* in this line i am getting erro */
}

you use label variable, but it is not defined anywhere. It should be props.label?

But also, later you are using this like that:

label: <Label />,

So you are not giving any props to this component. So even with above fix, it won’t be working.

I recommend to use TypeScript in your project with ESLint it will catch such issues right in your code editor (missing required params, or using undefined variables).

tech