MCPcopy Create free account
hub / github.com/microsoft/SandDance / getInitialState

Method getInitialState

docs/app/js/sanddance-app.js:11632–11642  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

11630 this.state = this.getInitialState(this.props);
11631 }
11632 getInitialState(props) {
11633 const initialState = {
11634 initializer: props.initializer,
11635 dialogHidden: true,
11636 exportType: exportTypes[0][0],
11637 fileName: props.initializer.fileName,
11638 fileNameError: "",
11639 working: false
11640 };
11641 return initialState;
11642 }
11643 componentDidUpdate() {
11644 if (!(0, _sanddanceReact.util).deepCompare(this.props.initializer, this.state.initializer)) this.setState(this.getInitialState(this.props));
11645 }

Callers 2

constructorMethod · 0.95
componentDidUpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected