Error: `’`. React/no-unescaped-entities.

This error appears in React-based apps. In my case it was in Next.JS. Because of apostrophe sign.

For example, I have a button link in my navbar and called it “Lets Talk”.

As you can see after “Let” I have ‘ single quote (apostrophe), which causes the error.

nextjs navbar code screenshot

After pushing my changes to the server (production) I get this error on my Vercel (cloud deployment platform ) dashboard in deployment section.

To resolve this small issue, I just have to change the apostrophe sign  (single quote) with this expression – ' with semicolon on it’s end.

Let's Talk

After refreshing and pushing the new changes to the server, the issue will be resolved.

But on frontend we will still see the “Lets Talk” expression with our apostrophe sign.

Thanks for reading.

You can learn more by following my social media:

Support my blog by this link: https://buymeacoffee.com/edx126

Schedule a Call

Posted by Edgar Hovhannisyan

Comments

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