MDB React Element has no corresponding closing tag


Topic: "MDB React Element" has no corresponding closing tag

bgining2this asked 3 years ago

Expected.- No syntax errors in Visual Studio Code.

Current.- Multiple syntax errors in MDBReact complaining that several elements have no closing tag when it is present.

enter image description here


chiok zechariah commented a year ago

I have the same issue, how can I solve these ? thank you!


Krzysztof Wilk staff commented a year ago

Hi!

Did you try the solution below?

Keep coding!


Piotr Glejzer staff answered 3 years ago

Hello bgining2this,

I recommend installing prettier plugin.

and this errors happens because you are putting a jsxcode to js file and Visual Studio Code doesn't recognize that. There are a few ways to fix this problem. The easiest way is to change a file extension to .jsx instead .js and set to setting format on save to true in VSC.

The next solution is that you can change Select Language Mode in VSC ( right bottom corner ) and also set to format on save.

or you can set globally to recognize .jsx but you have to change settings with prettier https://prettier.io/blog/2017/08/29/1.6.0.html like this. .

Best,
Piotr


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.21.0
  • Device: Desktop
  • Browser: Chromium, Opera
  • OS: Arch Linux
  • Provided sample code: No
  • Provided link: No