Skip to content

fix: update JSX syntax to self-closing tags (img) in writing-markup-w…#8539

Closed
rusicsemenov wants to merge 1 commit into
reactjs:mainfrom
rusicsemenov:fix/writing-markup-with-jsx
Closed

fix: update JSX syntax to self-closing tags (img) in writing-markup-w…#8539
rusicsemenov wants to merge 1 commit into
reactjs:mainfrom
rusicsemenov:fix/writing-markup-with-jsx

Conversation

@rusicsemenov

Copy link
Copy Markdown

fix: update JSX syntax to self-closing tags (img) in writing-markup-with-jsx.md

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@smith558

smith558 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@rusicsemenov Please close the PR. These are NOT mistakes; these are intentional. Have a look at the whole article.

@rusicsemenov

rusicsemenov commented Jul 20, 2026

Copy link
Copy Markdown
Author

@smith558 Hi,
<img> is a void element, so it can't have a closing tag; it should be self-close it with /> (or just leave it unclosed in plain HTML).

yes, maybe for first part we can skip it, nut in the App components (JSX) ing tag should be closed

image

@smith558

smith558 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@rusicsemenov I think you misunderstood. The section in the article is about examples of INCORRECT tags. So this is on purpose. You are right that the snippet is not correct. However, in this case, that is on purpose! :)

Have a look at the paragraphs above and below in the article. :)
image

@rusicsemenov

Copy link
Copy Markdown
Author

@smith558 Maybe you are right and they are special made more than one mistake, and later show fill for all of them. Yes in this case I can close PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants