Preact: Docs for `require("preact/debug");`?

Created on 7 Sep 2017  路  4Comments  路  Source: preactjs/preact

I can't find any mention of the relatlively new require("preact/debug") in the readme or the site. From the pull request it looks like it's configurable, but I don't see how. Is it meant to replace require("preact/devtools"), or be a more react-ish alternative? If the first, it should probably replace that section at the bottom of the readme, otherwise maybe a separate section underneath?

documentation help wanted

All 4 comments

Yes, we definitely need to add some documentation around it. It's a drop-in replacement for preact/devtools that adds some logging akin to what you get from React's dev mode. It pulls in preact/devtools as part of that, so you can just change any import to preact/debug.

Gotcha, thanks for the quick response! Looks like the initial comment in the pull request has plenty of info for a section in the readme (https://github.com/developit/preact/pull/633#issue-220394871), I'll check in tonight after work if no one has claimed it and attempt a pull request. And did you have a preference for replacing the preact/devtools section with this, or adding the new docs under it?

Maybe we just thin out the devtools section? It's more likely people would use it as part of debug now. I'd say add the new docs above and just keep a minimal explanation of preact/devtools underneath (or as part of the docs for debug). Happy to have the help updating docs!

Sounds good, I'll get to it when I get a chance! And no prob!

Was this page helpful?
0 / 5 - 0 ratings