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

Method constructor

test/browser/fragments.test.jsx:1029–1036  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1027
1028 class List extends Component {
1029 constructor() {
1030 super();
1031 this.state = { values: [0, 1, 2] };
1032 push = () =>
1033 this.setState({
1034 values: [...this.state.values, this.state.values.length]
1035 });
1036 }
1037
1038 render() {
1039 return (

Callers

nothing calls this directly

Calls 1

setStateMethod · 0.80

Tested by

no test coverage detected