TypeScript type {price: number | string}

How to fix type error Type 'string' is not assignable to type 'number' in a form, I have a controlled input name="price" that i want to give a init value of empty string, onChange handles the input change making it of type number.
0 Replies
No replies yetBe the first to reply to this messageJoin