React: State not updating in realtime

Created on 25 Sep 2019  路  7Comments  路  Source: facebook/react

I am updating state in setState() and the page is rendered correctly, but "React Developer Tools" is showing previous state.
Objects and Arrays are updating in realtime but not "boolean / string / number values".
But when I close the dev tools window ( not switching tabs ) and reopen it, then only it shows the updated state.
I don't remember if this was the issue from prev version, but please add realtime state update functionality to it.

Developer Tools Duplicate

Most helpful comment

Ah thanks @bvaughn, I didn't see that duplicate issue. Thanks for all your great work, DevTools is a lifesaver.

All 7 comments

do you have an example of the issue?

Hi Yasuf, I have made a video of the issue, hope it will help you in understanding the issue better.
https://drive.google.com/file/d/1kMxzZUfuoQZfEgq1JNrK0pg3VJM3NSPb/view

I'm also experiencing this exact same issue as in @rohan7chaudhary's video above. Chrome Version 77.0.3865.90 (Official Build) (64-bit), Mac OS X 10.14.6 (18G95), React Developer Tools 4.1.0 (updated 19th September 2019), React version 16.9.0.

The state (as seen in the React DevTools) does not update when the DevTools are open, but closing the Chrome Developer Tools and reopening the React DevTools to inspect the state shows that the state has changed. It feels like I've accidentally turned on some kind of setting to 'freeze' the state but only in React DevTools?

Duplicate of #16843

Fix will be going out sometime this afternoon, probably. Sorry for the inconvenience.

Ah thanks @bvaughn, I didn't see that duplicate issue. Thanks for all your great work, DevTools is a lifesaver.

@bvaughn Did you ever resolve the issue regarding state not reflecting updates with React DevTools ?

Hi @mcgee87 an update should have been released a while ago - if it's still happening to you, have you tried uninstalling DevTools and reinstalling to ensure you pick up the latest version? Chrome's extension updating mechanism isn't that obvious unfortunately - AFAIK it likes to just update silently in the background.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zpao picture zpao  路  3Comments

hnordt picture hnordt  路  3Comments

jimfb picture jimfb  路  3Comments

huxiaoqi567 picture huxiaoqi567  路  3Comments

zpao picture zpao  路  3Comments