I have and custom input that I use in my project. And I want to make check on input value before put it in props. I put in input value number which I get from mapping array. I want to make a check like if arrVal !== 0 put arrVal else put 1
{arr.map((it, i) => (
<Input
value={it.num} // here make a check like it.num !== 0 ? it.num : 1
/>
))}