Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dash/dash-renderer/src/wrapper/DashWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function DashWrapper({
const dispatch = useDispatch();
const memoizedKeys: MutableRefObject<MemoizedKeysType> = useRef({});
const newRender = useRef(false);
const freshRenders = useRef(0);
const renderedPath = useRef<DashLayoutPath>(componentPath);
let renderComponent: any = null;
let renderComponentProps: any = null;
Expand All @@ -85,6 +86,7 @@ function DashWrapper({
if (_newRender) {
newRender.current = true;
renderH = 0;
freshRenders.current += 1;
if (renderH in memoizedKeys.current) {
delete memoizedKeys.current[renderH];
}
Expand Down Expand Up @@ -498,6 +500,7 @@ function DashWrapper({
}
error={_dashprivate_error}
dispatch={dispatch}
key={freshRenders.current}
>
<DashContextProvider componentPath={componentPath}>
{React.isValidElement(hydrated) ? hydrated : <div />}
Expand Down
Loading