constructor(props) {
        super(props);
        this.isOpen = false;
        this.leftActionActivated = false;
        this.rightActionActivated = false;
        this.previousTrackedTranslateX = 0;
        this.currentTranslateX = 0;
        this.previousTrackedDirection = null;
        this.horizontalSwipeGestureBegan = false;
        this.swipeInitialX = null;
        this.parentScrollEnabled = true;
        this.ranPreview = false;
        this._ensureScrollEnabledTimer = null;
        this.isForceClosing = false;
        this.state = {
            leftActionActivated: false,
            rightActionActivated: false,
            leftActionState: this.props.initialLeftActionState || false,
            rightActionState: this.props.initialRightActionState || false,
            previewRepeatInterval: null,
            timeBetweenPreviewRepeats: null,
            dimensionsSet: false,
            hiddenHeight: this.props.disableHiddenLayoutCalculation
                ? '100%'
                : 0,
            hiddenWidth: this.props.disableHiddenLayoutCalculation ? '100%' : 0,
        };
        this._translateX = new Animated.Value(0);

        this._panResponder = PanResponder.create({
            onMoveShouldSetPanResponder: (e, gs) =>
                this.handleOnMoveShouldSetPanResponder(e, gs),
            onPanResponderMove: (e, gs) => this.handlePanResponderMove(e, gs),
            onPanResponderRelease: (e, gs) =>
                this.handlePanResponderRelease(e, gs),
            onPanResponderTerminate: (e, gs) =>
                this.handlePanResponderEnd(e, gs),
            onShouldBlockNativeResponder: () => false,
        });

        this._translateX.addListener(({ value }) => {
            this.currentTranslateX = value;
            if (this.props.onSwipeValueChange) {
                let direction = this.previousTrackedDirection;
                if (
                    value !== this.previousTrackedTranslateX &&
                    Math.abs(value - this.previousTrackedTranslateX) > 0.5
                ) {
                    direction =
                        value > this.previousTrackedTranslateX
                            ? 'right'
                            : 'left';
                }
                this.props.onSwipeValueChange &&
                    this.props.onSwipeValueChange({
                        isOpen: this.isOpen,
                        direction,
                        value,
                        key: this.props.swipeKey,
                    });
                this.previousTrackedTranslateX = value;
                this.previousTrackedDirection = direction;
            }
        });

        if (
            this.props.forceCloseToRightThreshold &&
            this.props.forceCloseToRightThreshold > 0
        ) {
            this._translateX.addListener(({ value }) => {
                if (
                    !this.isForceClosing &&
                    Dimensions.get('window').width + value <
                        this.props.forceCloseToRightThreshold
                ) {
                    this.isForceClosing = true;
                    this.forceCloseRow('right');
                    if (this.props.onForceCloseToRight) {
                        this.props.onForceCloseToRight();
                    }
                }
            });
        }

        if (
            this.props.forceCloseToLeftThreshold &&
            this.props.forceCloseToRightThreshold > 0
        ) {
            this._translateX.addListener(({ value }) => {
                if (
                    !this.isForceClosing &&
                    Dimensions.get('window').width - value <
                        this.props.forceCloseToLeftThreshold
                ) {
                    this.isForceClosing = true;
                    this.forceCloseRow('left');
                    if (this.props.onForceCloseToLeft) {
                        this.props.onForceCloseToLeft();
                    }
                }
            });
        }

        if (
            this.props.onLeftActionStatusChange &&
            this.props.leftActivationValue &&
            this.props.leftActivationValue > 0
        ) {
            this._translateX.addListener(({ value }) => {
                const absValue = Math.abs(value);
                const isActivated = absValue > this.props.leftActivationValue;
                if (this.leftActionActivated !== isActivated && value > 0) {
                    this.props.onLeftActionStatusChange({
                        isActivated,
                        value,
                        key: this.props.swipeKey,
                    });
                    this.leftActionActivated = isActivated;
                    this.setState({
                        leftActionActivated: isActivated,
                    });
                }
            });
        }

        if (
            this.props.onRightActionStatusChange &&
            this.props.rightActivationValue &&
            this.props.rightActivationValue < 0
        ) {
            this._translateX.addListener(({ value }) => {
                const absValue = Math.abs(value);
                const isActivated =
                    absValue > Math.abs(this.props.rightActivationValue);
                if (this.rightActionActivated !== isActivated && value < 0) {
                    this.props.onRightActionStatusChange({
                        isActivated,
                        value,
                        key: this.props.swipeKey,
                    });
                    this.rightActionActivated = isActivated;
                    this.setState({
                        rightActionActivated: isActivated,
                    });
                }
            });
        }
    }
Row that is generally used in a SwipeListView.
If you are rendering a SwipeRow explicitly you must pass the SwipeRow exactly two children.
The first will be rendered behind the second.
e.g.
  <SwipeRow>
      <View style={hiddenRowStyle} />
      <View style={visibleRowStyle} />
  </SwipeRow>