I'm new to Preact.
Long time ago I was using React and it was almost necessary to use this tool to speed everything up: https://github.com/welldone-software/why-did-you-render.
Today I started working with Preact for the first time and I was wondering if today we still need a tool like that.
And if so, how can we make it work for Preact?
From here it seems to me that nobody knows how: https://github.com/welldone-software/why-did-you-render/issues/113.
Hi there! Preact has its own developer tools that you can install as a browser extension:
https://preactjs.github.io/preact-devtools/
As for the "Why Did You Render" library, the reason there is no specific documentation on how to set it up with Preact is because it works out-of-the-box with preact/compat. Just set up the aliases and it'll print the same data it would for React.
Here's their codesandbox that I forked and dropped in the aliases on:
https://codesandbox.io/s/why-did-you-render-preact-6kcum?file=/package.json
(in the case of codesandbox the aliases are a little weird, normally it's {"react":"npm:@preact/compat"} or similar)
I'm going to close this one out since it's a question, but feel free to ask any further questions on Slack - Saturdays aren't as quick to get an answer, but it's generally a better avenue than GitHub for things like this.
As for the "Why Did You Render" library, the reason there is no specific documentation
Even better, it's included in our devtools extension as part of the Profiler. It will record why an update was triggered. See the following screenshot :+1:

Most helpful comment
Hi there! Preact has its own developer tools that you can install as a browser extension:
https://preactjs.github.io/preact-devtools/
As for the "Why Did You Render" library, the reason there is no specific documentation on how to set it up with Preact is because it works out-of-the-box with
preact/compat. Just set up the aliases and it'll print the same data it would for React.Here's their codesandbox that I forked and dropped in the aliases on:
https://codesandbox.io/s/why-did-you-render-preact-6kcum?file=/package.json
(in the case of codesandbox the aliases are a little weird, normally it's
{"react":"npm:@preact/compat"}or similar)I'm going to close this one out since it's a question, but feel free to ask any further questions on Slack - Saturdays aren't as quick to get an answer, but it's generally a better avenue than GitHub for things like this.