refactor(wdr): no logs
This commit is contained in:
@@ -34,7 +34,7 @@ function onMouseDown(evt, { nodeId, dispatch, onConnect, isTarget }) {
|
||||
document.addEventListener('mouseup', onMouseUp)
|
||||
}
|
||||
|
||||
export default memo(({ source, target, nodeId, onConnect, dispatch, className = null, ...rest }) => {
|
||||
const BaseHandle = memo(({ source, target, nodeId, onConnect, dispatch, className = null, ...rest }) => {
|
||||
const handleClasses = cx(
|
||||
'react-graph__handle',
|
||||
className,
|
||||
@@ -50,3 +50,8 @@ export default memo(({ source, target, nodeId, onConnect, dispatch, className =
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
BaseHandle.displayName = 'BaseHandle';
|
||||
BaseHandle.whyDidYouRender = false;
|
||||
|
||||
export default BaseHandle;
|
||||
@@ -4,7 +4,7 @@ import BaseHandle from './BaseHandle';
|
||||
import { GraphContext } from '../../GraphContext';
|
||||
import NodeIdContext from '../NodeIdContext'
|
||||
|
||||
export default memo((props) => {
|
||||
const TargetHandle = memo((props) => {
|
||||
const nodeId = useContext(NodeIdContext);
|
||||
const { dispatch, onConnect } = useContext(GraphContext);
|
||||
|
||||
@@ -19,3 +19,8 @@ export default memo((props) => {
|
||||
);
|
||||
});
|
||||
|
||||
TargetHandle.displayName = 'TargetHandle';
|
||||
TargetHandle.whyDidYouRender = false;
|
||||
|
||||
export default TargetHandle;
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export default NodeComponent => {
|
||||
});
|
||||
|
||||
WrappedComp.displayName = 'Wrapped Node';
|
||||
WrappedComp.whyDidYouRender = true;
|
||||
WrappedComp.whyDidYouRender = false;
|
||||
|
||||
return WrappedComp;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user