Skip to content

DevTools: Updating state or props in devtools does not trigger component update. #17305

@thisisDom

Description

@thisisDom

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Changing state or props for a component in React-Devtools isn't updating component.

What is the expected behavior?

Component should reflect changes made to state/props in React-Devtools

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Using React-Devtools v4 w/ React 16.9
Working in v3 of React-Devtools

Activity

changed the title [-]DevTools: Updating state or props in devtools does not trigger state.[/-] [+]DevTools: Updating state or props in devtools does not trigger component update.[/+] on Nov 7, 2019
threepointone

threepointone commented on Nov 7, 2019

@threepointone
Contributor

This needs more information than just saying it doesn't work. Could you use codesandbox to make a reproducing example?

thisisDom

thisisDom commented on Nov 7, 2019

@thisisDom
Author

Here is the codesandbox I used:
https://codesandbox.io/s/y2lrywpk21

I changed the value of state.text to "test" in React-Devtools but the change isn't reflected in the input field. I uploaded a screenshot below.

https://www.dropbox.com/s/jfjak9t32lyv599/Screen%20Shot%202019-11-07%20at%203.46.26%20PM.png?dl=0

hristo-kanchev

hristo-kanchev commented on Nov 8, 2019

@hristo-kanchev
Contributor

@thisisDom I can't reproduce the issue.
Did you by any chance forgot to press Enter after you entered the text?

thisisDom

thisisDom commented on Nov 8, 2019

@thisisDom
Author

Yeah looks like that was my issue. In the previous version, I could click out of the console and it would update. Thank you

hristo-kanchev

hristo-kanchev commented on Nov 9, 2019

@hristo-kanchev
Contributor

@thisisDom We have a PR open for this #17062 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @threepointone@hristo-kanchev@thisisDom

        Issue actions

          DevTools: Updating state or props in devtools does not trigger component update. · Issue #17305 · facebook/react