Skip to content

Commit

Permalink
perf(component): do not schedule render for synchronous events (#3487)
Browse files Browse the repository at this point in the history
  • Loading branch information
markostanimirovic committed Jul 25, 2022
1 parent 398fbed commit bb9071c
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 30 deletions.
4 changes: 4 additions & 0 deletions modules/component/spec/core/render-event/handlers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,30 @@ describe('combineRenderEventHandlers', () => {
const suspenseEvent: SuspenseRenderEvent = {
type: 'suspense',
reset: true,
synchronous: true,
};
testRenderEvent(suspenseEvent);

const nextEvent: NextRenderEvent<number> = {
type: 'next',
value: 1,
reset: true,
synchronous: false,
};
testRenderEvent(nextEvent);

const errorEvent: ErrorRenderEvent = {
type: 'error',
error: 'ERROR!',
reset: false,
synchronous: true,
};
testRenderEvent(errorEvent);

const completeEvent: CompleteRenderEvent = {
type: 'complete',
reset: false,
synchronous: false,
};
testRenderEvent(completeEvent);
});

0 comments on commit bb9071c

Please sign in to comment.