-
Bug
-
Resolution: Duplicate
-
Undefined
-
None
-
4.19
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
The console constantly re-renders dynamic plugin pages.
Version-Release number of selected component (if applicable):
4.19
How reproducible:
always
Steps to Reproduce:
1. create a dynamic console plugin with the following React code:
import React, { memo } from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
let rerenders = 0;
function TestPageBug() {
const navigate = useNavigate();
console.log('TestPageBug render');
return <div>TestPageBug re-renders: {rerenders++}</div>;
}
export default memo(TestPageBug);
Actual results:
the counter on the page keeps increasing every 10-15 seconds
Expected results:
the page never re-renders
Additional info:
If I uncomment the useNavigate() hook, the page does not rerender. If I use the useParams() hook, the page also constantly re-renders. I assume it's linked to the react-router change in 4.19. With OCP 4.18, this bug does not happen. Depending on the page, the re-rendering may be not noticeable in the best case, and causes flickers and cache resets in the worst case.
- causes
-
OU-762 [Traces] - on ocp4.19, Query field is broken and Gantt chart is refreshing frequently
-
- Closed
-
- duplicates
-
OCPBUGS-45930 kubevirt-plugin extensions reload repeatedly causing flickering in UI in Developer Sandbox OpenShift
-
- Closed
-