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.

Rerendering parent view causes incorrect swipe animation offset

See original GitHub issue

I’m using react-native-appearance to listen to the system appearance change event. When the system appearance changes, all the mounted screens will rerender. With enableScreens called, the parent screen will animate incorrectly on iOS, as the screenshot below.

11573619380_ pic_hd

react-navigation: 4.0.10 react-navigation-stack: 1.10.3 react-navigation-tabs: 2.5.6 react-native-screens: 2.0.0-alpha.8 react-native: 0.61.4 system: iOS 13.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
cmmartincommented, Nov 14, 2019

I have possibly the same issue. I can only seem to reproduce it in Release mode. (Edit: reproduced Debug Mode also) Basically I can swipe the screen to the right, creating the gap on the left side. Almost like a drawer that should not exist…

I’m not sure if this is an issue with this repo or react-navigation

IMG_1466

"react-native": "0.60.5",
 "react-native-screens": "^2.0.0-alpha.8",
iOS: 13.1.3
3reactions
Mlobaievskyicommented, Nov 20, 2019

You just need to replace your import { createStackNavigator } from 'react-navigation-stack' with import createNativeStackNavigator from 'react-native-screens/createNativeStackNavigator';. It should resolve your issues (refer to docs https://github.com/kmagiera/react-native-screens#using-native-stack-navigator)

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to prevent parent from re-rendering but re-render child ...
I was trying to implement a slider using react-glider. where I was changing the background color of the slider element when it is...
Read more >
Making Sense of react-spring - CSS-Tricks
First, we'll add some state to our modal that switches animation on and off. const animatModalSizing = useRef(true); const modalSizingPacket = ...
Read more >
Props | React Native Bottom Sheet - GitHub Pages
fillParent : extend the sheet to fill the parent view. interactive : offset the sheet by the size of the keyboard. type, default,...
Read more >
Slow rendering - Android Developers
If significant layout is happening on each frame, it's possible that you're animating layout, which is likely to cause dropped frames. Generally ...
Read more >
Common Issues | Swup
People tend to use a class with a format of transition-[something] on any element that is animating, which is not necessary and often...
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