Skip to content

setState warning using v5.0.0-rc.1 with redux-form. #564

@mariuszdev

Description

@mariuszdev

The following error appears using [email protected] when I am unmounting component which renders redux-form's <Field /> component only if the <Field /> has been previously focused. I know that it seems like problem with redux-form but when I switch back to [email protected] everything works fine.

warning.js:36 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 Connect(ConnectedField) component.

Tested on OSX and [email protected] (64-bit) and [email protected] (12602.2.14.0.7)

How to reproduce

  1. Clone the repository https://github.com/pilaas/react-redux-bug
  2. yarn
  3. npm run start
  4. Open browser http://localhost:8080
  5. Open console and enter type store.dispatch({type: 'SHOW_FORM'});
  6. Focus newly appeared input component
  7. Enter store.dispatch({type: 'HIDE_FORM'}); in console
  8. Experience warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions