mobxjs / mobx-react

React bindings for MobX

Home Page:https://mobx.js.org/react-integration.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Log why function component re-rendered

evelant opened this issue · comments

Perhaps I'm missing something obvious here, but I can't seem to find a way to log the reason why a function component wrapped in observer is re-rendering. I tried trace() but it just prints "[mobx.trace] 'observer' tracing enabled" and no further information.

What's the best way to log why a function component is rendering?

Ah, I made an unrelated mistake causing confusion. trace() works fine. Thanks!