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

Method constructor

compat/test/browser/suspense.test.jsx:1677–1684  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

1675
1676 class Updater extends Component {
1677 constructor(props) {
1678 super(props);
1679 this.state = { i: 0 };
1680
1681 increment = () => {
1682 this.setState(({ i }) => ({ i: i + 1 }));
1683 };
1684 }
1685
1686 render(props, { i }) {
1687 return (

Callers

nothing calls this directly

Calls 1

setStateMethod · 0.80

Tested by

no test coverage detected