Error: Warning: This synthetic event is reused for performance reasons
joseph-ampfer opened this issue · 1 comments
joseph-ampfer commented
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={tw
text-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 commented
You need to add this as props:
avoidKeyboardLikeIOS={true}
keyboardAvoidingBehavior={Platform.OS === 'ios' ? undefined : 'height'