Skip to content

Commit d2afce4

Browse files
committed
removing useCallback from setProps and running format
1 parent 677abb3 commit d2afce4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

dash/dash-renderer/src/wrapper/DashWrapper.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ function DashWrapper({
9191
} else {
9292
newRender.current = false;
9393
}
94-
renderedPath.current = componentPath
94+
renderedPath.current = componentPath;
9595
}, [_newRender]);
9696

97-
const setProps = useCallback((newProps: UpdatePropsPayload) => {
97+
const setProps = (newProps: UpdatePropsPayload) => {
9898
const {id} = renderComponentProps;
9999
const {_dash_error, ...restProps} = newProps;
100100

@@ -103,7 +103,10 @@ function DashWrapper({
103103
dispatch((dispatch, getState) => {
104104
const currentState = getState();
105105
const {graphs} = currentState;
106-
const oldLayout = getComponentLayout(renderedPath.current, currentState);
106+
const oldLayout = getComponentLayout(
107+
renderedPath.current,
108+
currentState
109+
);
107110
if (!oldLayout) return;
108111
const {props: oldProps} = oldLayout;
109112
if (!oldProps) return;
@@ -152,7 +155,7 @@ function DashWrapper({
152155
);
153156
});
154157
});
155-
}, [componentPath]);
158+
};
156159

157160
const createContainer = useCallback(
158161
(container, containerPath, _childNewRender, key = undefined) => {

0 commit comments

Comments
 (0)