Categories
React Answers

How to fix ‘Expected corresponding JSX closing tag for input’ error with React?

Spread the love

Sometimes, we want to fix ‘Expected corresponding JSX closing tag for input’ error with React.

In this article, we’ll look at how to fix ‘Expected corresponding JSX closing tag for input’ error with React.

How to fix ‘Expected corresponding JSX closing tag for input’ error with React?

To fix ‘Expected corresponding JSX closing tag for input’ error with React, we should close the tags in our element.

For instance, we write

<input type="text" class="validate" />

to add a slash to close the input tag in our JSX code.

Then the error will go away.

Conclusion

To fix ‘Expected corresponding JSX closing tag for input’ error with React, we should close the tags in our element.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *