Solve React error "Property autocomplete does not exist on type"

Emmanuel Gautier / February 28, 2023

1 min read

Sometimes, it happens that an easy-to-solve issue takes you more time than it should because there are several solutions after making some search and you can not figure out what is the right one. The Typescript React error Property 'autocomplete' does not exist on type is maybe one of them.

This error usually occurs when you try to use the autocomplete property on an HTML input element in a React component and TypeScript doesn't recognize it as a valid property.

This is just a matter of case-sensitive property! In order to solve this issue, you can change the autocomplete property to the autoComplete property. Here's an example:

function MyInput() {
  return <input type="text" autoComplete="off" />;
}

Hope this post saved you some time.

Consulting

If you're seeking solutions to a problem or need expert advice, I'm here to help! Don't hesitate to book a call with me for a consulting session. Let's discuss your situation and find the best solution together.

Share this post
Follow the RSS feed