Motivation: This fixes a React warning of updating component state on a render. It was caught by HMR of React Dev Server:
react-dom.development.js:86 Warning: Cannot update a component (`UIModeView`) while rendering a different component (`TestListView`). To locate the bad setState() call inside `TestListView`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at TestListView (http://localhost:44223/trace/src/ui/uiModeTestListView.tsx:38:5)
at MillionProfilerRaw (http://localhost:44223/trace/node_modules/.vite/deps/@million_lint_runtime-dev.js?v=362ca7e4:7363:13)
at div
at div
at div
at SplitView (http://localhost:44223/trace/@fs/Users/maxschmitt/Developer/playwright/packages/web/src/components/splitView.tsx:31:5)
at MillionProfilerRaw (http://localhost:44223/trace/node_modules/.vite/deps/@million_lint_runtime-dev.js?v=362ca7e4:7363:13)
at div
at UIModeView (http://localhost:44223/trace/src/ui/uiModeView.tsx:70:28)
printWarning @ react-dom.development.js:86
Motivation: This fixes a React warning of updating component state on a render. It was caught by HMR of React Dev Server:
See https://reactjs.org/link/setstate-in-render for more details.