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

Function handlePreferredSyntaxChange

site/components/CodeBlock.js:52–62  ·  view source on GitHub ↗
(syntax)

Source from the content-addressed store, hash-verified

50 }
51
52 handlePreferredSyntaxChange(syntax) {
53 if (this.state.chosen || this.state.syntax === syntax) {
54 return;
55 }
56
57 if (this.props[syntax].trim().length) {
58 this.setState({
59 syntax
60 });
61 }
62 }
63
64 componentWillUnmount() {
65 this.unsubscribe();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected