Skip to content

Commit be62d56

Browse files
committed
chore: Use willChange work with transform to enhance display perf
1 parent 76ff41b commit be62d56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Filler.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const Filler: React.FC<FillerProps> = ({ height, offset, children }): React.Reac
2525

2626
innerStyle = {
2727
...innerStyle,
28-
marginTop: offset,
28+
transform: `translateY(${offset}px)`,
29+
willChange: 'transform',
2930
position: 'absolute',
3031
left: 0,
3132
right: 0,

0 commit comments

Comments
 (0)