title: How can I use props, $ref and $emit in Vue-cli?
body: <p>I've been learning Vuejs with Vue-cli.</p>
  
  <p>I'm trying to figure out how <code>props</code> and <code>$emit</code> work.</p>
  
  <p>One thing I can't figure out is that how do I handle with <code>function</code> related to sevral components.</p>
  
  <p><code>All</code>,<code>Ongoing</code>, <code>Done</code> buttons are supposed to filter list depend on each checkbox value and its color changes to green when active.</p>
  
  <p>I don't know where to put <code>filteredTodos() {}</code> stuff which currently I added in <code>ListTodo.vue</code>, since those are related in both of <code>Swichers.vue</code> and <code>ListTodo.vue</code>.</p>
  
  <p>My code is: <a href="https://codesandbox.io/s/oqyob?file=/src/App.vue" rel="nofollow noreferrer">Here</a></p>
  
  <p>If somebody knows, could you tell me how?</p>
  
  <p>Thanks</p>