Open cjmling opened 2 years ago
If we have component like this
<Text> label='outline' helperText='chandu' error=true </Text>
And only want to set helperText and error only when error variable is true, then we can use spread operator
<Text> label='outline' { ...(error && {error:true, helperText:'chandu } </Text>
More info. https://youtu.be/m-2_gb_3L7Q?t=8245
SEO react conditional props
If we have component like this
And only want to set helperText and error only when error variable is true, then we can use spread operator
More info. https://youtu.be/m-2_gb_3L7Q?t=8245
SEO react conditional props