Skip to content

Commit 1d636f8

Browse files
committed
docs: apply copilot suggestion
1 parent 778d42f commit 1d636f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/hooks/useChildren.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function useChildren<T>(
1212
renderFunc: RenderFunc<T>,
1313
getKey: GetKey<T>,
1414
) {
15-
// 可能存在 list 不变但是里面的数据存在变化的情况,会与之前写法存在不同的行为
15+
// The list reference may remain unchanged, but its internal data may change, which can result in different behavior compared to the previous implementation.
1616
return React.useMemo(() => {
1717
return list.slice(startIndex, endIndex + 1).map((item, index) => {
1818
const eleIndex = startIndex + index;

src/hooks/useHeights.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ export default function useHeights<T>(
9494
return cancelRaf;
9595
}, []);
9696

97-
// 这里稍显迷惑性,当 heightsRef.current.set 被调用时,updatedMark 会变化,进而导致 heightsRef.current 也出现变化
97+
// This is somewhat confusing: when heightsRef.current.set is called, updatedMark changes, which in turn causes heightsRef.current to also change.
9898
return [setInstanceRef, collectHeight, heightsRef.current, updatedMark];
9999
}

0 commit comments

Comments
 (0)