perf(react-doctor): fix compiler-blocking patterns, raise score 72→81

Replace sync setState-in-effect with keyed remount and render-derived patterns in app, error-display, topbar-edit-modal, catalog-filters; use useCurrentTime() instead of Date.now() in hot paths; fix conditional hooks, passive scroll listeners, lodash path imports.
This commit is contained in:
plebeius
2026-02-18 15:31:01 +08:00
parent afb50ad02d
commit e0ed510fc6
27 changed files with 213 additions and 200 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ import usePublishReply from '../../hooks/use-publish-reply';
import { useFileUpload } from '../../hooks/use-file-upload';
import useMediaHostingStore from '../../stores/use-media-hosting-store';
import styles from './post-form.module.css';
import { capitalize, debounce } from 'lodash';
import capitalize from 'lodash/capitalize';
import debounce from 'lodash/debounce';
// Separate component for offline alert to isolate rerenders from updatingState
// Only this component will rerender when updatingState changes, not the whole PostForm