Skip to content

InteractionManager runAfterInteractions sometimes don't trigger, trigger properly most of the time in React Native 0.51.0 #17345

@fuxianwei

Description

@fuxianwei

is a bug

Have you read the Contributing Guidelines?

yes

Environment

Steps to Reproduce

Sometimes initPage: true will not be triggered, the code is as follows:

   constructor(props) {
        super(props)

        this.state = {
            initPage: false
        }
    }
   componentDidMount() {
        InteractionManager.runAfterInteractions(() => {
            this.setState({
                initPage: true
            }, () => {
                this.requestData()
            })
        })
    }

Expected Behavior

Each trigger changes initPage: true

Actual Behavior

Most of the time it's triggered to change initPage: true, which occasionally doesn't trigger, and the previous react native version doesn't seem to have the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions