mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
Merge pull request #58 from jhbruhn/feature/react-memo-optimization
feature: Enhance Konva rendering with React.memo optimization
This commit is contained in:
commit
d213ab49e2
1 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* Handles both interactive (draggable/rotatable) and locked states
|
||||
*/
|
||||
|
||||
import { useMemo, type RefObject } from "react";
|
||||
import { useMemo, memo, type RefObject } from "react";
|
||||
import { Group, Transformer } from "react-konva";
|
||||
import type Konva from "konva";
|
||||
import type { KonvaEventObject } from "konva/lib/Node";
|
||||
|
|
@ -30,7 +30,7 @@ interface PatternLayerProps {
|
|||
attachTransformer?: () => void;
|
||||
}
|
||||
|
||||
export function PatternLayer({
|
||||
export const PatternLayer = memo(function PatternLayer({
|
||||
pesData,
|
||||
offset,
|
||||
rotation = 0,
|
||||
|
|
@ -143,4 +143,4 @@ export function PatternLayer({
|
|||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue