Skip to content
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

Fire 'onLayout' when elements are resized #848

Closed
wants to merge 11 commits into from
8 changes: 6 additions & 2 deletions website/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This guide will help you to use and test React Native for Web once it has been installed.

Your application may need to polyfill `Promise`, `Object.assign`, and
`Array.from` as necessary for your desired browser support.
Your application may need to polyfill `Promise`, `Object.assign`,
`Array.from` and [`ResizeObserver`](#resizeobserve) as necessary for your desired browser support.

## Adding to a new web app

Expand Down Expand Up @@ -272,3 +272,7 @@ flexbox layout.

There are properties that do not work across all platforms. All web-specific
props are annotated with `(web)` in the documentation.

### ResizeObserver

To observe layout changes and fire [`onLayout`](https://facebook.github.io/react-native/docs/view.html#onlayout) when elements are resized, React Native for Web uses the [`ResizeObserver` API](https://wicg.github.io/ResizeObserver/). Browsers that don't support this API require a [polyfill](https://github.com/que-etc/resize-observer-polyfill) for this feature.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a native speaker so there might be errors. Feel free to edit this in line in case you spot any :)