title: vuejs - Changing a computed property via a method
body: <p>I am trying to adjust a computed property within a vue component inside a method. When this property changes I am trying to show/hide a <code>div</code>.  Currently when I perform the click event, I am seeing the correct boolean log under the <code>set</code> function, but not seeing any change to the <code>showBanner</code> prop.</p>
  
  <p>Here's where I'm at.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;template&gt;
    &lt;div v-if="someConfig.displayBanner &amp;&amp; showBanner" class="bn-banner"&gt;
      {{showBanner}}
    &lt;/div&gt;
  &lt;/template&gt;
  
  
  &lt;script&gt;
    import { mapActions, mapState } from 'vuex';
  
    export default{
  
      name: "myComponentShell",
  
      computed: {
        ...mapState('utilitiesStore', [
          'someConfig'
          ]),
  
          styleObject () {
            return {
              background: this.someConfig.colorHex
            }
          },
  
      showBanner:{
  
        get () {
          return (this.someConfig.text === localStorage.getItem("gma_alerts_hide")) ? false : true
        },
  
        set (value) {
          console.log(value)
          return value
        }
      }
  
  
      },
  
      methods: {
        ...mapActions('utilitiesStore', [
            'getJSON'
          ]),
  
          closeBreaking () {
            localStorage.setItem("someData", this.someConfig.text)
            this.showBanner = false;
          }
      },
  
    }
  
  &lt;/script&gt;
  </code></pre>