Skip to content

(Image) Fix documentation for onLoad event. #2964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,11 @@ Invoked on mount and on layout changes.

Invoked when load completes successfully.

| Type |
| ------------------------------------------------ |
| ([ImageLoadEvent](image#imageloadevent)) => void |
**Example:** `onLoad={({nativeEvent: {source: {width, height}}}) => setImageRealSize({width, height})}`

| Type |
| ----------------------------------------------------------------- |
| ({ nativeEvent: [ImageLoadEvent](image#imageloadevent) }) => void |

---

Expand Down Expand Up @@ -572,6 +574,14 @@ Object returned in the `onLoad` callback.

**Properties:**

| Name | Type | Description |
| ------ | ------ | ----------------------------------- |
| source | object | The [source object](#source-object) |

#### Source Object

**Properties:**

| Name | Type | Description |
| ------ | ------ | ------------------------------------------------------------ |
| width | number | The width of loaded image. |
Expand Down