Skip to content

Commit 5defc84

Browse files
committed
add a comment explaining the change
1 parent 42386d1 commit 5defc84

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/ConfirmModal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ function ConfirmModal({
153153
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
154154
const {isSmallScreenWidth} = useResponsiveLayout();
155155
const styles = useThemeStyles();
156+
156157
// Previous state needed for exiting animation to play correctly.
157158
const prevVisible = usePrevious(isVisible);
159+
160+
// Perf: Prevents from rendering whole confirm modal on initial render.
158161
if (!isVisible && !prevVisible) {
159162
return null;
160163
}

0 commit comments

Comments
 (0)