I have a pre-rendered value that always has to be a number type. I set the TextInput value to this number but it does not display in the input field unless I convert the number to a string. However, when the number is converted to a string using toString() or String(value), editing the TextInput by clearing out the field causes NaN to display in the field which becomes impossible to wipe out as it keeps recurring after every attempt.
Here is how the TextInput looks:
<TextInput value={5}/>
//displays nothing in the field unless when like this:
<TextInput value="5"/>
<TextInput value={value.toString()}/> and <TextInput value={String(value}/> cause NaN when the field is cleared completely
It also does not emit a number value, but not rendering a number value is the more serious problem.
Please can anyone tell me how I can solve this?