Preact: Error from preact/debug for code wich doesnt exist?

Created on 11 Dec 2019  路  2Comments  路  Source: preactjs/preact

Hello,

since Im using preact X with the debugger I get the following error:

Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.

Ive searched a lot in my codebase and didnt find any this.setState in a constructor neither online any solution for this error message.,

It would be nice if the debug mode would give me the name of the component wich causes the error.

Most helpful comment

Thank you for your fast support t.
Merry Xmas!

All 2 comments

The PR to display component stack traces got approved and I merged it in master. We'll cut a new release sometime around next Tuesday probably (we don't release on weekends :wink: )

Thank you for your fast support t.
Merry Xmas!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matuscongrady picture matuscongrady  路  3Comments

jescalan picture jescalan  路  3Comments

philipwalton picture philipwalton  路  3Comments

k15a picture k15a  路  3Comments

Zashy picture Zashy  路  3Comments