Skip to content

Commit 7111e77

Browse files
committed
Explain empty image source caveat
1 parent 8b6536c commit 7111e77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/content/reference/react-dom/components

‎src/content/reference/react-dom/components/img.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To display an image, render the [built-in browser `<img>` component](https://dev
4949

5050
#### Caveats {/*caveats*/}
5151

52-
* Do not pass an empty string to `src`. React warns in development and omits the attribute. To render no image, omit the `<img>` or pass `null` to `src`.
52+
* Do not pass an empty string to `src`. It may cause the browser to request the current page again. React warns in development and omits the attribute. To render no image, omit the `<img>` or pass `null` to `src`.
5353
* `<img>` cannot have children or use `dangerouslySetInnerHTML`. React throws an error if you pass either.
5454
* `fetchPriority="low"` does not stop React from waiting for the image to load and decode during a client-rendered View Transition update. Use `loading="lazy"` or an `onLoad` handler to opt out of that behavior.
5555

0 commit comments

Comments
 (0)