[Vuejs]-Vue loses slot reactivity when use with render function

0👍

try something like:

function selectChildren(VNodes) {...} // return VNode[]

export default {
  render(h){
    let VNodes = this.$slots.default || []

    let items = selectChildren(VNodes)
    return h("div", [items.map(item => h("div", {...},[item]))])
  }
}

Leave a comment