title: Is it necessary to split mapState between a string array and object spread operator?
body: <p>I am working with Vuex and I have 2 states:</p>
  <pre><code>state: {
    token: 'xyz',
    user: {
       id: 1,
       user: 'cody',
       username: 'cody'
       }
  }
  </code></pre>
  <p>In the component, I have used the following:</p>
  <pre><code>&lt;template&gt;
  &lt;div&gt;
    &lt;button @click=&quot;getProfile&quot;&gt;
        click to get profile
    &lt;/button&gt;
    &lt;p&gt;{{ user.name }}&lt;/p&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import { mapState } from 'vuex'
  export default {
      name: &quot;Profile&quot;,
      computed: {
          ...mapState({
              token: &quot;token&quot;,
          }),
          ...mapState([&quot;user&quot;])
      },
      methods: {
          getProfile() {
              fetch(&quot;http://localhost:3000/profile&quot;, {
                  headers: {
                      Authorization: `Bearer ${this.token}`,
                  }
              })
          }
      }
  }
  &lt;/script&gt;
  </code></pre>
  <p>Noticed at the computed section I have used 2 mapState rather than one.</p>
  <pre><code>computed: {
          ...mapState({
              token: &quot;token&quot;,
          }),
          ...mapState([&quot;user&quot;])
      },
  </code></pre>
  <p>May I ask if it is possible to declare the string array <strong>and</strong> object spread operator together in a single mapState declaration? Because right now I need to have 2 mapState in order to make it work. So I am just wondering if I am missing anything when I only use one mapState?</p>