mobxjs / mobx-react-devtools

[DEPRECATED] Tools to perform runtime analyses of React applications powered by MobX and React
MIT License
1.23k stars 49 forks source link

[Discussion] Mobx Devtools vs React Devtools inconsistent highlighted updates #82

Open carlosagsmendes opened 6 years ago

carlosagsmendes commented 6 years ago

Hi,

I'm getting inconsistent results when using the highlight updates feature of Mobx React Devtools and React Devtools.

Using Mobx-React-Devtools the Mobx components are only highlighted twice (when they render the first time and after being updated when I click the update button:

mobx-devtools-1

But when I use React Devtools the Mobx components are always being highlighted suggesting that they are always being rendered:

2018-02-10_1653

Is this expected?

Here is a link to the sample project on CodeSandBox in case you want to try it out.

I've also noticed that on both Mobx components there's an update method being called every single time:

performance mobx

I'm mentioning it since I don't see something similar for the sample React PureComponent that I'm using without Mobx.

mweststrate commented 6 years ago

There might be a difference in on what lifecycle the highlights are triggered, it might be that the mobx tools only highlight on actual render, where the React ones update new state / or props