-
Notifications
You must be signed in to change notification settings - Fork 24
Closed as not planned
Description
I've noticed that createHOC
looses data.attributes
in produced components which leads to loosing class and other attributes in actual DOM.
E.g.
export const BackBtn = createHOC(IconBtn, {
name: 'BackBtn',
functional: true,
// render (h, ctx) {
// return h(IconBtn, { ...ctx.data, props: { ...ctx.props, icon: 'arrow_back' } })
// }
}, {
props: { icon: 'arrow_back' }
})
When using in template like
<back-btn class="green--text"></back-btn>
Does not include class green-text
But when defined like:
export const BackBtn = createHOC({}, {
name: 'BackBtn',
functional: true,
render (h, ctx) {
return h(IconBtn, { ...ctx.data, props: { ...ctx.props, icon: 'arrow_back' } })
}
})
It does.