question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: It is not supported to use minDist with activeOffsetX or activeOffsetY

See original GitHub issue

I’m using RN Modalize and have had several projects using the react-native-modalize library and no problems so far. but this time I created a new project and have followed the tutorial to apply react-native-modalize but get an error like this if I run modalizeRef.current?.open(); : image

import React, {useRef} from 'react';
import {
  ImageBackground,
  StyleSheet,
  Text,
  TouchableOpacity,
  View,
} from 'react-native';
import {Modalize} from 'react-native-modalize';
import {login_bottom, login_top} from '../assets';
import {colors} from '../constants';

const Login = ({navigation}) => {
  const modalizeRef = useRef(null);
  const onPressLogin = () => {
    modalizeRef.current?.open();
  };

  return (
    <>
      <Modalize ref={modalizeRef}></Modalize>
      <View style={styles.container}>
        <View style={{flex: 1, justifyContent: 'space-around'}}>
          <ImageBackground
            source={login_top}
            style={{
              width: null,
              height: '100%',
            }}
          />
        </View>
        <View style={{flex: 1, justifyContent: 'space-around'}}>
          <View style={styles.containerLogin}>
            <TouchableOpacity style={styles.loginButton} onPress={onPressLogin}>
              <Text style={styles.loginButtonText}>LOGIN</Text>
            </TouchableOpacity>
          </View>
        </View>
        <View style={{flex: 1, justifyContent: 'space-around'}}>
          <ImageBackground
            source={login_bottom}
            style={{
              width: null,
              height: '105%',
            }}
          />
        </View>
      </View>
    </>
  );
};

Dependencies:

   "react": "16.13.1",
    "react-native": "0.63.4",
    "react-native-gesture-handler": "^2.0.0",
    "react-native-modalize": "^2.0.12",

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:23
  • Comments:10

github_iconTop GitHub Comments

12reactions
hasanalicansucommented, Dec 8, 2021

Bro I had the same problem, change react-native-gesture-handler version. Install this version react-native-gesture-handler@1.10.3 solves the problem for now, and wait the fix problem for new react-native-gesture-handler.

8reactions
MrXyfircommented, Dec 9, 2021

@gesangseto Can you keep this open? The real solution here is for react-native-modalize to support v2 of react-native-gesture-handler.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: It is not supported to use minDist with activeOffsetX or ...
I updated the react-native-modalize version to "^2.0.8" and the error stopped showing for me.
Read more >
PanGestureHandler | React Native Gesture Handler
A continuous gesture handler that can recognize a panning (dragging) gesture and track its movement. The handler activates when a finger is placed...
Read more >
react-native-modalize - npm
A highly customizable modal/bottom sheet that loves scrolling content. This component has been built with react-native-gesture-handler to ...
Read more >
react-native-gesture-handler#PanGestureHandlerGestureEvent
The following examples show how to use react-native-gesture-handler. ... { flexBasis: `${100 / childCount}%` }]} disabled={selection.value === i} ...
Read more >
[Solved] Modalize React-Native Error: It is not supported to ...
Gesang Aji Seto Asks: Modalize React-Native Error: It is not supported to use minDist with activeOffsetX or activeOffsetY I'm using RN ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found