title: Changing color of selected polygon on google-maps-react
body: <p>I'm using <a href="https://www.npmjs.com/package/google-maps-react" rel="nofollow noreferrer">google-maps-react</a> and trying to change the color of an overlaid polygon as it's selected. The polygons are also part of the google-maps-react.</p>
  
  <p>The polygons accept a new selected state, and the setColor function even returns the correct color. It just doesn't change on the map itself.</p>
  
  <p>Code is as follows:</p>
  
  <pre><code>setColor = (selected, index) =&gt; {
        if (selected) {
            return "blue" //Even when blue is returned, no color change is visible
        } else {
            return "red"
        }
    }
  
  
  
  render() {
      return (
          &lt;Polygon
            paths={this.props.paths}
            onClick={() =&gt; this.handleClick()}
            strokeColor="#2A2A57"
            strokeOpacity={0.8}
            strokeWeight={2} 
            fillColor = {this.setColor(this.state.isSelected, this.state.index)}
            fillOpacity={0.35}
            {...this.props}
          /&gt;
        )
      }
  </code></pre>