Skip to content

Commit ba17d88

Browse files
committed
Use useLayoutEffect for Bubble
useEffect causes an annoying flickering effect on changing the bubble position that seems to be avoided by useLayoutEffect. Thanks @mwiencek for the suggestion.
1 parent ecd7e36 commit ba17d88

File tree

1 file changed

+1
-1
lines changed
  • root/static/scripts/common/components

1 file changed

+1
-1
lines changed

root/static/scripts/common/components/Bubble.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ component Bubble(
5252
},
5353
});
5454

55-
React.useEffect(() => {
55+
React.useLayoutEffect(() => {
5656
refs.setReference(controlRef.current);
5757
}, [controlRef, refs]);
5858

0 commit comments

Comments
 (0)