We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b7275 commit 16081b3Copy full SHA for 16081b3
libs/react/src/components/context-tree.tsx
@@ -18,7 +18,7 @@ export const ContextTree: FC<{
18
const TreeItem: FC<{
19
node: IContextNode
20
component: React.FC<{ context: IContextNode; insPoints: InsertionPointWithElement[] }>
21
-}> = ({ node, component: Component }) => {
+}> = React.memo(({ node, component: Component }) => {
22
const [wrappedNode, setWrappedNode] = useState({ node })
23
const [insPoints, setInsPoints] = useState([...node.insPoints])
24
const [children, setChildren] = useState([...node.children])
@@ -73,4 +73,4 @@ const TreeItem: FC<{
73
))}
74
</>
75
)
76
-}
+})
0 commit comments