MCPcopy Index your code
hub / github.com/Lobos/react-ui / constructor

Method constructor

src/Switch.js:10–16  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

8
9class Switch extends Component {
10 constructor(props){
11 super(props)
12 this.state = {
13 checked:props.checked
14 }
15 this.handleChange = this.handleChange.bind(this)
16 }
17
18 componentWillReceiveProps(nextProps) {
19 if (nextProps.checked !== this.props.checked) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected