equinor/webviz-subsurface-components

[NGRM] - SyncLogViewer is not working if wrapped with React.StrictMode component

Closed this issue · 2 comments

Introduction:
React.StrictMode component is used to debug components and make sure they are written correctly. https://react.dev/reference/react/StrictMode
StrictMode is only active in dev mode thus it is not in effect when running production mode.

Problem:
When wrapping SyncLogViewer in StrictMode it becomes disfunctional:
dfc100ca-19f3-49d7-baff-8f46287ca0d4

Also in Dev Tools console we see errors:
image

This problem is interfering with development and also indicates a malfunction in the SyncLogView component.

One sort of strict mode warnings in the console was removed in PR #2087 (commit)
Another sort of warnings (as in the issue description) still exists

After #2139 there are no more errors in console while strict mode is active and component is working smoothly.