Are you using TypeScript here? I've heard that you can't do things like number: number in normal JavaScript (and yes ik this is React but React is built on either plain JS and JSX or TypeScript and JSX), but this is only tagged as JavaScript and not TypeScript so I'm a bit confused
Software developer trying to bring order into his craft. I write about my journey, thoughts, and practices. Currently focused on web frontend with React.
Are you using TypeScript here? I've heard that you can't do things like
number: number
in normal JavaScript (and yes ik this is React but React is built on either plain JS and JSX or TypeScript and JSX), but this is only tagged as JavaScript and not TypeScript so I'm a bit confusedIt's Typescript yes. Thanks for letting me know, I've updated the tag.