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

Method constructor

test/browser/refs.test.jsx:349–353  ·  view source on GitHub ↗
(props, context)

Source from the content-addressed store, hash-verified

347
348 class Child extends Component {
349 constructor(props, context) {
350 super(props, context);
351 this.state = { show: false };
352 inst = this;
353 }
354 handleMount() {}
355 render(_, { show }) {
356 if (!show) return <div id="div" ref={this.handleMount} />;

Callers

nothing calls this directly

Calls 1

createRefFunction · 0.90

Tested by

no test coverage detected