mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
6941c4e027
Summary: public The current `ScrollView.scrollTo()` API is confusing due to the `(y, x)` parameter order, and the boolean `animated` argument. E.g. ScrollView.scrollTo(5, 0, true) // what do these arguments mean? This diff replaces the API with a configuration object, so the arguments are all explicit: ScrollView.scrollTo({x: 0, y: 5, animated: true}) // much better The `scrollTo()` method checks the argument types, and provides backwards compatibility with the old argument format for now. Using the old API will generate a warning, and this will eventually be upgraded to an error. Reviewed By: davidaurelio Differential Revision: D2892287 fb-gh-sync-id: cec4d504242391267c6e863816b6180ced7a7d5e