src/components/Sitemap.js
// 'focusOn' is an array state to keep track of the previous states.
'focusOn' is an array state to keep track of the previous states.
' focusOn ' is an array state to keep track of the previous states .
changeFocus(id) {
    if (this.state.focusOn.includes(id)) {
      this.setState({
        focusOn: this.state.focusOn.filter(item => item != id)
      });
    } else {
      this.setState({ focusOn: [...this.state.focusOn, id] });
    }
  }
changeFocus ( id ) { if ( this . state . focusOn . includes ( id ) ) { this . setState ( { focusOn : this . state . focusOn . filter ( item => item != id ) } ) ; } else { this . setState ( { focusOn : [ ... this . state . focusOn , id ] } ) ; } }
'focusOn' is an array state to keep track of the previous states.
' focusOn ' is an array state to keep track of the previous states .