Reputation: 71
I've created my handleChange()
function with some event to handle event from my input. The problem is that I don't know what to add to solve the error.
Here below screenshot of this:
I'm using Next.js. In React I would never see something like that.
Thank you in advance for help.:)
Upvotes: 0
Views: 1403
Reputation: 40919
It looks like you've set up your Next.js project with TypeScript and your typescript configuration has noImplicitAny check enabled, that causes that error to be reported.
Easiest way to fix it would be to explicitly set event type to any.
const handleChange = (event: any) => {
Much better way to fix it would be to use a proper TypeScript type React.ChangeEvent
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
Upvotes: 2