Property 'strike' does not exist on type 'JSX.IntrinsicElements'

Updated on

If you’re using TypeScript with React, you might see the following error:

Property 'strike' does not exist on type 'JSX.IntrinsicElements'.ts(2339)

The reason for the error is that <strike> is a deprecated HTML element.

The solution to the problem is to use <del> or <s> instead of <strike>. The <del> tag is used to indicate that content has been deleted, and <s> is for other cases where <strike> would have been used.

The error will then disappear and the TypeScript code will compile.

Tagged with: Programming JavaScript

Feedback and Comments

What did you think about this page? Do you have any questions, or is there anything that could be improved? You can leave a comment after clicking on an icon below.