Sawtaytoes
3/20/2019 - 8:43 AM

Props as State Best-Practice

class Node extends Component {
  constructor(props) {
    super(props)

    const {
      initialColor,
      initialValue,
    } = props

    this
    .state = {
      color: initialColor,
      value: initialValue,
    }
  }
}