return shouldUpdate
}
-// compat only
export function createComponentClassFromOptions(
options: ComponentOptions
): ComponentClass {
for (const key in options) {
const value = options[key]
if (typeof value === 'function') {
- ;(ObjectComponent.prototype as any)[key] =
- key === 'render'
- ? // normalize render for legacy signature
- function render() {
- return value.call(this, h)
- }
- : value
+ ;(ObjectComponent.prototype as any)[key] = value
}
if (key === 'computed') {
const isGet = typeof value === 'function'