MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / constructor

Function constructor

site/components/CodeBlock.js:37–46  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

35 };
36
37 constructor(props) {
38 super(props);
39 this.state = {
40 chosen: false,
41 syntax: this.props.es7.trim().length && 'es7' ||
42 this.props.es6.trim().length && 'es6' ||
43 this.props.es5.trim().length && 'es5',
44
45 };
46 }
47
48 componentDidMount() {
49 this.unsubscribe = subscribe(this.handlePreferredSyntaxChange.bind(this));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected