From fee3899ce1404c4b612734d2b3c450120523141d Mon Sep 17 00:00:00 2001 From: naqvitalha Date: Wed, 29 Nov 2017 08:57:01 +0530 Subject: [PATCH] added comment --- src/platform/reactnative/viewrenderer/ViewRenderer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/reactnative/viewrenderer/ViewRenderer.tsx b/src/platform/reactnative/viewrenderer/ViewRenderer.tsx index 9af08929..49d41495 100644 --- a/src/platform/reactnative/viewrenderer/ViewRenderer.tsx +++ b/src/platform/reactnative/viewrenderer/ViewRenderer.tsx @@ -50,6 +50,7 @@ export default class ViewRenderer extends BaseViewRenderer { } private _onLayout(event: LayoutChangeEvent): void { + //Preventing layout thrashing in super fast scrolls where RN messes up onLayout event const xDiff = Math.abs(this.props.x - event.nativeEvent.layout.x); const yDiff = Math.abs(this.props.y - event.nativeEvent.layout.y); if (xDiff < 1 && yDiff < 1 &&