I'm writing a library that logs when components get re-rendered, so I need to detect that.
I can do it for components that extends React.Component
by monkey-patching React.Component.prototype.componentDidUpdate
, but how can I detect when a pure function component gets rendered? Is that even possible to do?