Skip to content

Commit 0f05ac7

Browse files
tay1orjonesabbeyhrtkodiakhq[bot]
authored
fix(composedmodal): do not run cleanup effect on every update (#11930)
Co-authored-by: Abbey Hart <abbeyhrt@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 8308e65 commit 0f05ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react/src/components/ComposedModal/ComposedModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const ComposedModal = React.forwardRef(function ComposedModal(
200200
useEffect(() => {
201201
return () =>
202202
toggleClass(document.body, `${prefix}--body--with-modal-open`, false);
203-
});
203+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
204204

205205
useEffect(() => {
206206
toggleClass(document.body, `${prefix}--body--with-modal-open`, open);

0 commit comments

Comments
 (0)