perf(reactivity): avoid triggering re-render if computed value did not change

This commit is contained in:
Evan You
2021-07-06 22:01:59 -04:00
parent f5617fc3bb
commit ebaac9a56d
3 changed files with 41 additions and 1 deletions

View File

@@ -2,6 +2,10 @@ import { ErrorCodes, callWithErrorHandling } from './errorHandling'
import { isArray } from '@vue/shared'
import { ComponentInternalInstance, getComponentName } from './component'
import { warn } from './warning'
import { setComputedScheduler } from '@vue/reactivity'
// set scheduler for computed
setComputedScheduler(queueJob)
export interface SchedulerJob extends Function {
id?: number