-
Notifications
You must be signed in to change notification settings - Fork 299
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
This synthetic event is reused for performance reasons #451
Comments
I'm having the same problem after updating to |
This comment was marked as spam.
This comment was marked as spam.
having the same problem after upgrading to |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I downgrade the expo version to 46.0.0 and the error is gone |
@ckswopnera downgrade isn't option. I'm not using expo. downgrade version cause error in Xcode and another things. |
same here. |
btw on android I can't scroll down to close modal, only by calling |
in my case, this error only occurs when I remove the adjustToContentHeight property, if anyone else can test if this is it?! |
@willLopesz what version of gesture-handler? In my case, I'm not using |
I’m not using |
Guys, In my investigations I found a bug in the onLayout prop of the KeyboardAvoidingView component, which was corrected and merged here: In this lib it is used here in the code:
According to that comment the problems with the Animation. facebook/react-native#28775 (comment) I removed it and posted it on my github. Can anyone help me test?
|
Hi, diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
index 6a343d8..474b2ec 100644
--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
+++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -111,6 +111,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
this._initialFrameHeight = this._frame.height;
}
+ if (this.props.onLayout) {
+ event.persist();
+ }
+
if (wasFrameNull) {
await this._updateBottomIfNecessary();
} |
For me this patch causes the error is no longer being thrown. However the modal can only be closed with close(), not via swipe. Edit: I accidentally was missing the GestureHandlerRootView in my main App.tsx file. Adding fixed the issue with swipe events not working. |
I have a similar problem. There is no re-rendering of elements inside a modal on Android =( react: |
add |
But what if i dont want to set the height fixed? |
I'm using Expo. where is: replaces to: It worked here!! |
same problem here. does anyone manage to fix this ? |
hacky but working and fixed height is preserved. for example replace <Modalize
modalHeight={370}
...
/> with <Modalize
adjustToContentHeight
childrenStyle={{ height: 370 }}
...
/> |
the error stoped but the modal dont open if i press back button and try open the modal again. |
Thanks, works for me too! The |
Basta fazer isto em seu App.js
|
@jnoleau Thank you. Work for me |
This also solves a bit of a memory/performance issue related to the initial problem. |
this worked for me! |
It indeed ending error log, but this way prevents scrollable-gesture in child flatlist |
This worked for me, thanks. |
what about scrolling? |
I utilized a promise to coerce the module to believe that avoidKeyboardLikeIOS is true on modal rendering, and then flipped to false, resulting in the desired performance on Android.
Scrolling will operate in one direction. If you were scrolling, you can travel both directions, but when you want to scroll to the top, it won't. |
onClose={() => {}} add these props |
this will remove error, onClose={() => {}} "expo": "~51.0.28", and this will enable scrolling |
any solution for this? nothing in the thread seems to work for my case: |
ERROR Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property
nativeEvent
on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://reactjs.org/link/event-pooling for more information.WARN Possible Unhandled Promise Rejection (id: 0):
TypeError: null is not an object (evaluating '_ref2.nativeEvent.layout')
Reproduce
Dependencies:
The text was updated successfully, but these errors were encountered: