Skip to content

Warning If KeyboardedInput is unmounted and unfocused simultaneously #51

@etctschq

Description

@etctschq

I have run into a scenario where a user has used KeyboardedInput, and then clicks on a button in my UI that causes the KeyboardedInput component to be unmounted, but this also triggers the KeyboardInput's HandleFocusLost function.

This results in a warning like so:

warning.js:33 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the KeyboardedInput component.

In my local testing I have removed the setTimeout() wrapper on this line, and I no longer receive the warning. Does this setTimeout() wrapper serve a purpose?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions