MCPcopy
hub / github.com/preactjs/preact / constructor

Method constructor

compat/test/browser/compat.options.test.jsx:43–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42 class ClassApp extends Component {
43 constructor() {
44 super();
45 this.state = { count: 0 };
46 increment = () =>
47 this.setState(({ count }) => ({
48 count: count + 1
49 }));
50 }
51
52 render() {
53 return (

Callers

nothing calls this directly

Calls 1

setStateMethod · 0.80

Tested by

no test coverage detected