#icons

4 messages · Page 1 of 1 (latest)

shut oarBOT
#

Hi @burnt dome. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Astro does not automatically add closing tags to components. However, it's important to note that self-closing tags can cause issues in certain situations. For example, when using experimentalReactChildren, self-closing tags such as hr or input inside of a React component can cause an error. The error message might be something like this:

(...) is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.

The expected behavior is that self-closing tags should be preserved. You can find more details about this issue on this GitHub issue (https://github.com/withastro/astro/issues/8432).

Also, when migrating from GitBook to Astro, the / prefix denoting a closing tag in GitBook syntax is replaced with end for GitBook files. You will need to update this notation throughout your files. More details can be found in this guide (https://docs.astro.build/en/guides/migrate-to-astro/from-gitbook/).

If you're facing a specific issue with closing tags in Astro, it would be helpful to provide more context or a code snippet to better understand and address the problem.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@burnt dome kapa.ai is still learning and improving, please let us know how it did by reacting below

burnt dome
#

@shut oar how can i prevent vscode intellisense adding the component closing tag to the wrong place?