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.

`runAfterIteractions` nested works terribly

See original GitHub issue

react-native version

info 
  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
      CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
      Memory: 328.77 MB / 7.68 GB
      Shell: 4.4.20 - /bin/bash
    Binaries:
      Node: 10.16.3 - /usr/local/bin/node
      npm: 6.9.0 - /usr/local/bin/npm
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5900203
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8 

Steps To Reproduce

I use runAfterIteractions to do a modal switch. With the simple switch, it works well. And I want to add a time-consuming task after switch, by runAfterIteractions nested. It looks like:

set first-modal-visible false;
runAfterInteractions(()=> {
  set second-modal-visible true;
  runAfterInteractions(()=> {
    run time-consuming task;
  });
});

Actually, it will run the task, then do a Modal switch. What’s the reason?

Describe what you expected to happen

I want to add a time-consuming task after Modal switch. But, actually, the task will run before Modal switch.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
safaiyehcommented, Mar 20, 2020

Hi @kangbb, thank you for the issue.

Can you include some more information for this can be investigated: • Verify it happens on the latest RN version • Provide a Snack or reproducible demo

0reactions
stale[bot]commented, Jun 28, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Limitations and Best Practices to Deal With Them
In this article we're going to expand on React Native limitations and React Native performance tips. Best practices and for using this ...
Read more >
InteractionManager - React Native
runAfterInteractions () is not working properly on web. It triggers immediately without waiting until the interaction is finished. Reference.
Read more >
Practical React Native: Build Two Full Projects and One Full ...
An excellent set of development tools makes working with React Native smoother and faster than many other options (hot reloading
Read more >
[Solved]-how to make variable and use in UITableView in swift 3
dataTask(with works asynchronously. Move tableView.reloadData() into the completion block at the end of the closure. Two notes:.
Read more >
Practical React Native - PDF Free Download - DocPlayer.net
No, you can now write your app once, using React Native, and have it work on both ... The README.md file is also...
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