Skip to content

InteractionManager is not working #22982

@yasir-netlinks

Description

@yasir-netlinks

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: (4) x64 Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz
      Memory: 53.33 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.10.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 25.0.1, 25.0.3, 26.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3
        System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.6.3 => 16.6.3 
      react-native: ^0.57.8 => 0.57.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

Hi guys, as the title suggests, my code doesn't run when wrapped inside InteractionManager.runAfterInteractions. This is happening in Android but not sure about ios

e.g.

componentDidMount(){
       InteractionManager.runAfterInteractions(() => {
        this.props.navigation.setParams({
            headerRight: <SearchCount />
        });
      });
}

Similar issue is happening in other components where I wrapped few remote request to be dispatched inside InteractionManager but they do not execute at all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions