Back to React Native

LayoutEvent Object Type

website/versioned_docs/version-0.79/layoutevent.md

latest1.2 KB
Original Source

LayoutEvent object is returned in the callback as a result of component layout change, for example onLayout in View component.

Example

js
{
    layout: {
        width: 520,
        height: 70.5,
        x: 0,
        y: 42.5
    },
    target: 1127
}

Keys and values

height

Height of the component after the layout changes.

TypeOptional
numberNo

width

Width of the component after the layout changes.

TypeOptional
numberNo

x

Component X coordinate inside the parent component.

TypeOptional
numberNo

y

Component Y coordinate inside the parent component.

TypeOptional
numberNo

target

The node id of the element receiving the PressEvent.

TypeOptional
number, null, undefinedNo

Used by