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

Error: Warning: This synthetic event is reused for performance reasons #500

Open
joseph-ampfer opened this issue Mar 11, 2024 · 1 comment

Comments

@joseph-ampfer
Copy link

Describe the bug
Every time I try to use Modalize I get the synthetic event warning and Possible unhandled promise rejection: TypeError: Cannot read property 'layout' of null.

Even with the bare minimum modal, with only one line of text in it.

const modalizeRef = useRef(null);

const onOpen = () => { modalizeRef.current?.open(); }

<Pressable onPress={onOpen}> <Text style={twtext-white ml-21}>open modalize</Text> </Pressable>

<Modalize ref={modalizeRef} > <Text>Test test</Text> </Modalize>

Dependencies:

  • react-native-modalize [^2.1.1]
  • react-native [0.73.4]
  • react-native-gesture-handler [~2.14.0]
  • @react-navigation/native [^6.1.10]
  • @react-navigation/native-stack [^6.9.18]
@gyaurb
Copy link

gyaurb commented Apr 3, 2024

You need to add this as props:

avoidKeyboardLikeIOS={true}
keyboardAvoidingBehavior={Platform.OS === 'ios' ? undefined : 'height'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants