title: VueJS pass all props to child component
body: <p>I am quite new to VueJS. In react you can easily use rest params for passing props to children. Is there a similar pattern in Vue?</p>
  
  <p>Consider this parent component that has a few children components:</p>
  
  <pre><code>&lt;template&gt;
  &lt;header class="primary-nav"&gt;
  &lt;search-bar :config="searchBar"&gt;&lt;search-bar&gt;
  //          ^^^^ this becomes the key on the props for SearchBar
  header&gt;
  &lt;/template&gt;
  
  export default {
    data(){
      return {
        ... a few components ...
        searchBar : {
          model: '',
          name: 'search-bar',
          placeholder: 'Search Away',
          required:true,
          another: true
          andanother: true,
          andonemoreanotherone:true,
          thiscouldbehundredsofprops:true
        }
      }
    }
  }
  
  &lt;template&gt;
      &lt;div :class="name"&gt;
          &lt;form action="/s" method="post"&gt;
              &lt;input type="checkbox"&gt;
              &lt;label :for="config.name" class="icon-search"&gt;{{config.label}}&lt;/label&gt;
              &lt;text-input :config="computedTextInputProps"&gt;&lt;/text-input&gt;
                          //^^^^ and so on. I don't like this config-dot property structure.
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
    export default {
      props: {
          name: String,
          required: Boolean,
          placeholder: String,
          model: String,
      },
      computed: {
       computedtextInputProps(){
         return justThePropsNeededForTheTextInput
       }
      }
   ...  
  </code></pre>
  
  <p>What I don't like is that the props are named-spaced with the key <code>config</code>, or any other arbitrary key. The text-input component ( not shown ) is a glorified <code>input</code> field that can take a number of attributes. I could flatten the props when the component is created, but is that generally a good idea? </p>
  
  <p>I am surprised this question hasn't been asked before.</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit: 10-06-2017</strong></p>
  
  <p>Related: <a href="https://github.com/vuejs/vue/issues/4962" rel="noreferrer">https://github.com/vuejs/vue/issues/4962</a></p>