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.

Transitions on iOS are extremely glitchy when moving to gifted-chat

See original GitHub issue

Issue Description

When navigating the a page containing the <GiftedChat component the transition is extremely buggy, the page behind moves over slightly to the left and then after 2-3 seconds the chat component instantly flashes onto the screen. This is happening with every animation type under SceneConfigs in which there is a movement transition. I have not tested with FadeAndroid.

The Footer for the <GiftedChat also does not occur until this delay is finished.

NOTE: I added a custom component on the top of the screen with a fixed height and absolute positioning of 64 (A navigation bar) and it transitions over smoothly, it’s only the <GiftedChat component with a problem.

NOTE2: A blank array of messages on start-up time does not fix the issue, it takes roughly 600ms after the transition completes to snap into place.

Steps to Reproduce / Code Snippets

Just use the example code with React-natives Navigator component. Move to it using push({...}) and the problem occurs.

Expected Results

A smooth transition

Additional Information

  • React Native version: 0.32.0
  • react-native-gifted-chat version: 0.0.10
  • Platform(s) (iOS, Android, or both?): iOS (Simulator and Device)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jonathanglasmeyercommented, Oct 14, 2016

I experience the same issue. I have implemented the linked performance tweets and the problem appears in a release build. It also appears when showing the chat page initially (without transitioning to it): it takes about 600ms to render the chat bubbles, resulting in a very jerky experience. Any pointers how to tackle this? I’d be happy to PR but a direction which component might introduce this delay would be helpful.

Edit: looked at the code, found the source of my problem. Chat is only show when runAfterInteraction fires. This means that during a transition the screen will only show nothing (or a loading indicator?) and only then render the chat bubbles. It’d be nice to make this behaviour configurable, for me it seems that this should be a user responsibility.

0reactions
cooperkacommented, Aug 2, 2017

Hi @abeltje1, what navigation library are you using? Can you try running a Release build with chrome debugging turned off? Sometimes the debugger causes things like that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native gifted chat crashing on both emulator and device ...
As was said in the question title, it only happens on Android (both emulator and device) and it's working perfectly fine on iOS....
Read more >
Create magical move transitions between scenes in react-native
This is important so that Magic Move can correctly assess the destination-position of an animation. MagicMove.Scene is implemented using a regular View and ......
Read more >
The not so hidden cost of sharing code between iOS and ...
I have come to this same conclusion after many years. It's not cost-effective to have any bespoke business logic (models, controllers, etc.) ...
Read more >
Animations & Transitions - iOS Dev Scout - YouTube
Speaker: Sudeep Agarwal (@sudeeeeeep)Produced by Engineers.SGHelp us caption & translate this video!http://amara.org/v/WChk/
Read more >
How to build a chat app using React Native Hooks & Firebase
Now that we have understood the basics let's move on to React Native Hooks ... If you have problems running the iOS version,...
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