MCPcopy Create free account
hub / github.com/aaronshaf/react-toggle / getInitialState

Function getInitialState

index.es6.js:23–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 },
22
23 getInitialState() {
24 var checked = false;
25 if ('checked' in this.props) {
26 checked = this.props.checked
27 } else if ('defaultChecked' in this.props) {
28 checked = this.props.defaultChecked
29 }
30 return {
31 checked: !!checked,
32 hasFocus: false
33 }
34 },
35
36 componentWillReceiveProps(nextProps) {
37 if ('checked' in nextProps) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…