Skip to content

Cannot update a component from inside the function body of a different component. #487

Closed
@romiem

Description

@romiem

Ever since upgrading to React 16.13.1, I have been receiving this error ([email protected]).

The stack trace seems to point the finger at easy-peasy, to this line:

forceRender({});

It appears that this error is being caused when trying to setState on another component during the function component body. The react team have now deemed it a bad pattern which now throws an error.

Has anyone else had the same issue?

Some other resources on this issue:
facebook/react#18178
final-form/react-final-form#751 (comment)

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